313 lines
7.2 KiB
Plaintext
313 lines
7.2 KiB
Plaintext
table Dim_BrandMKT
|
|
lineageTag: ca124965-ac38-4d4a-add3-99afe0bd5da7
|
|
|
|
column MKT_PROD = IF([MARKET]<>BLANK() && [IMSBRAND] <> BLANK(), [MARKET]&[IMSBRAND])
|
|
lineageTag: dfd5d231-c860-4854-b2af-45698eb019a0
|
|
summarizeBy: none
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column MARKET
|
|
dataType: string
|
|
lineageTag: bfad4b35-6307-4c80-83a0-693e0c852d0d
|
|
summarizeBy: none
|
|
sourceColumn: MARKET
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column VBPFLAG
|
|
dataType: string
|
|
lineageTag: 9bc6be1f-5edf-41c1-88e8-f0805637fc8b
|
|
summarizeBy: none
|
|
sourceColumn: VBPFLAG
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column VALUETYPE
|
|
dataType: string
|
|
lineageTag: c9072504-ed42-4c4f-b18d-f7d8e791ff68
|
|
summarizeBy: none
|
|
sourceColumn: VALUETYPE
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column RNK
|
|
dataType: int64
|
|
formatString: 0
|
|
lineageTag: 07a6000f-bcf0-4cd3-8628-b2603a7086ed
|
|
summarizeBy: sum
|
|
sourceColumn: RNK
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column BRAND_NAME
|
|
dataType: string
|
|
lineageTag: eb5f2e01-c553-41e5-94c8-db1d967f245a
|
|
summarizeBy: none
|
|
sourceColumn: BRAND_NAME
|
|
sortByColumn: RNK
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CLASS
|
|
dataType: string
|
|
lineageTag: 0b173a2f-fe84-4fe3-8586-add2948af41b
|
|
summarizeBy: none
|
|
sourceColumn: CLASS
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CORP
|
|
dataType: string
|
|
lineageTag: 41ebd8a3-2713-4504-a528-e7a43b3d19dd
|
|
summarizeBy: none
|
|
sourceColumn: CORP
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column VBP
|
|
dataType: string
|
|
lineageTag: c7353cb7-3caf-46cd-a5e9-c9c6dcc9bcbc
|
|
summarizeBy: none
|
|
sourceColumn: VBP
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column TANAME =
|
|
|
|
SWITCH(TRUE(),
|
|
[TA_NAME] = "ONC","ONCO",
|
|
[TA_NAME])
|
|
lineageTag: d5416872-ab46-444c-a547-a4f0abdef173
|
|
summarizeBy: none
|
|
sortByColumn: TA_RN
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column BRANDGROUP =
|
|
SWITCH (
|
|
TRUE ( ),
|
|
Dim_BrandMKT[Strategicbrand] = "策略品牌", "Strategic brands",
|
|
Dim_BrandMKT[VBPFLAG] = "VBP" && Dim_BrandMKT[DATA_SOURCE]<>"DTP(Quarterly)", "VBP brands"
|
|
)
|
|
lineageTag: 29f7391c-1fbc-4a9f-8ce0-1b589a7a8b8d
|
|
summarizeBy: none
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column DefindMarket = IF([MARKET] = BLANK(),"UnKnow",[MARKET])
|
|
lineageTag: f24cc562-4f84-4284-b662-3cc1ab45f5e5
|
|
summarizeBy: none
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column TA_RN
|
|
dataType: string
|
|
lineageTag: 139c6a5b-b42e-4c94-9c57-46c8980d32dc
|
|
summarizeBy: none
|
|
sourceColumn: TA_RN
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column KEYCOMPATITORCN
|
|
dataType: string
|
|
lineageTag: 4852b821-da4e-4bc9-961c-55223fed4cab
|
|
summarizeBy: none
|
|
sourceColumn: KEYCOMPATITORCN
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column KEYCOMPATITOREN
|
|
dataType: string
|
|
lineageTag: 418415ba-44f5-4819-951b-7c7c020aded7
|
|
summarizeBy: none
|
|
sourceColumn: KEYCOMPATITOREN
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column KEYCOMPATITORCN2 = IF([CompatitorType] = "PROD_CORP",[KEYCOMPATITORCN]&"("&[CORP]&")",[KEYCOMPATITORCN])
|
|
lineageTag: 7ea17958-6025-46e9-846f-6359cb7f7cbe
|
|
summarizeBy: none
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column ValueTypeName = IF([VALUETYPE] = "RMB","Value",[VALUETYPE])
|
|
lineageTag: 4a4471f0-1afe-4404-bb41-75ce51bba0ad
|
|
summarizeBy: none
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column DATA_SOURCE
|
|
dataType: string
|
|
lineageTag: 3e65464e-7d26-47ee-ae16-d2cf4c8f190b
|
|
summarizeBy: none
|
|
sourceColumn: DATA_SOURCE
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column TA_NAME
|
|
dataType: string
|
|
lineageTag: 5a2f2195-95b3-4179-8d69-f3911eba7055
|
|
summarizeBy: none
|
|
sourceColumn: TA_NAME
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column IMSBRAND
|
|
dataType: string
|
|
lineageTag: 5cf4a60a-7963-4d7c-b909-e84c272b0732
|
|
summarizeBy: none
|
|
sourceColumn: IMSBRAND
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column Strategicbrand
|
|
dataType: string
|
|
lineageTag: 356bb205-a0ad-4823-8cc6-03c0567fffa8
|
|
summarizeBy: none
|
|
sourceColumn: Strategicbrand
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CompatitorMarket
|
|
dataType: string
|
|
lineageTag: 6665a376-c4e0-42c8-9f96-8ff087b1398c
|
|
summarizeBy: none
|
|
sourceColumn: CompatitorMarket
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CompatitorType
|
|
dataType: string
|
|
lineageTag: 15f3c95d-5a08-4abe-8cde-dea8f6f8bdd7
|
|
summarizeBy: none
|
|
sourceColumn: CompatitorType
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
|
lineageTag: 53c626e0-96ea-43b2-aa9a-018bbcf97f50
|
|
summarizeBy: none
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column BRAND_NAME_CN
|
|
dataType: string
|
|
lineageTag: 210af7c5-9cda-4546-bb49-cd4546831bf9
|
|
summarizeBy: none
|
|
sourceColumn: BRAND_NAME_CN
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column PROD_NAME = [BRAND_NAME_CN] & "(" & [BRAND_NAME]&")"
|
|
lineageTag: 3296d7cd-be2b-453f-ab0f-5fe1d6535995
|
|
summarizeBy: none
|
|
sortByColumn: RNK
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column IS_HIDDEN_COUNTY
|
|
dataType: int64
|
|
formatString: 0
|
|
lineageTag: 8a2003c6-a56b-42e8-af70-f41f5e5908b3
|
|
summarizeBy: none
|
|
sourceColumn: IS_HIDDEN_COUNTY
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column Definition
|
|
dataType: string
|
|
lineageTag: 2885513c-6cc4-4b7b-8636-b21a05e89dad
|
|
summarizeBy: none
|
|
sourceColumn: Definition
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
partition Dim_BrandMKT = m
|
|
mode: import
|
|
queryGroup: OLD\首页
|
|
source = ```
|
|
let
|
|
Source =
|
|
Value.NativeQuery(
|
|
Databricks.Catalogs(
|
|
ServerAddress, HttpPath, [
|
|
Catalog = CatalogName,
|
|
Database = null,
|
|
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
|
]
|
|
){
|
|
[Name = CatalogName, Kind = "Database"]
|
|
}[Data],
|
|
"
|
|
SELECT
|
|
TA_NAME,
|
|
RNK,
|
|
BRAND_NAME,
|
|
KEYCOMPATITORCN,
|
|
KEYCOMPATITOREN,
|
|
CLASS,
|
|
IMSBRAND,
|
|
CORP,
|
|
MARKET,
|
|
VBP,
|
|
VBPFLAG,
|
|
VALUETYPE,
|
|
Strategicbrand,
|
|
CompatitorMarket,
|
|
CompatitorType,
|
|
TA_RN,
|
|
DATA_SOURCE,
|
|
B.PROD_DES_C BRAND_NAME_CN,
|
|
CASE
|
|
WHEN TA_NAME = 'ONC' THEN 1
|
|
WHEN TA_NAME = 'RARE' THEN 2
|
|
ELSE 0
|
|
END AS IS_HIDDEN_COUNTY,
|
|
CONCAT(
|
|
MARKET,
|
|
' (',
|
|
CASE
|
|
WHEN VALUETYPE = 'RMB' THEN 'Value'
|
|
ELSE VALUETYPE
|
|
END,
|
|
')'
|
|
) AS Definition
|
|
FROM
|
|
DM.DM_TD_EXTERNAL_BRAND_MARKET A
|
|
LEFT JOIN (
|
|
SELECT
|
|
PROD_DES,
|
|
MAX(PROD_DES_C) PROD_DES_C
|
|
FROM
|
|
dm.dm_td_external_packinfo
|
|
GROUP BY
|
|
PROD_DES
|
|
) b ON a.IMSBRAND = b.PROD_DES
|
|
WHERE
|
|
DEFAULTFLAG = 1
|
|
"
|
|
& UsingLimit,
|
|
null,
|
|
[
|
|
EnableFolding = true
|
|
]
|
|
),
|
|
更改的类型 = Table.TransformColumnTypes(Source,{{"RNK", Int64.Type}})
|
|
in
|
|
更改的类型
|
|
```
|
|
|
|
annotation PBI_ResultType = Exception
|
|
|
|
annotation PBI_NavigationStepName = Navigation
|
|
|
|
annotation TabularEditor_TableGroup = 04_DimTable
|
|
|