68 lines
1.6 KiB
Plaintext
68 lines
1.6 KiB
Plaintext
table Dim_KeyCompetitor
|
|
lineageTag: a6eb142e-da93-4631-939c-d1305beec9f0
|
|
|
|
column KEY_COMPETITOR
|
|
dataType: string
|
|
lineageTag: 84a16438-9e6c-43a0-a64d-b7882754114e
|
|
summarizeBy: none
|
|
sourceColumn: KEY_COMPETITOR
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column KEY_COMPETITOR_CN
|
|
dataType: string
|
|
lineageTag: 132b2f1b-ad21-4104-8270-3d5aafb423a5
|
|
summarizeBy: none
|
|
sourceColumn: KEY_COMPETITOR_CN
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
partition Dim_KeyCompetitor = m
|
|
mode: import
|
|
queryGroup: Dim
|
|
source = ```
|
|
let
|
|
Source = Value.NativeQuery(
|
|
Databricks.Catalogs(
|
|
ServerAddress,
|
|
HttpPath,
|
|
[
|
|
Catalog = CatalogName,
|
|
Database = null,
|
|
EnableAutomaticProxyDiscovery = null,
|
|
EnableQueryResultDownload = "0"
|
|
]
|
|
){[Name = CatalogName, Kind = "Database"]}[Data],
|
|
"
|
|
WITH
|
|
distinct_competitor (
|
|
SELECT DISTINCT
|
|
KEY_COMPETITOR
|
|
FROM
|
|
DM.DM_TD_EXT_UNIONALL_MARKET_PACK_MAPPING
|
|
WHERE KEY_COMPETITOR is NOT NULL
|
|
)
|
|
SELECT
|
|
KEY_COMPETITOR,
|
|
NVL(MAX(t2.PROD_DESC_C), MAX(t1.KEY_COMPETITOR)) KEY_COMPETITOR_CN
|
|
FROM
|
|
distinct_competitor t1
|
|
LEFT JOIN DM.DM_TD_EXT_UNIONALL_PACKINFO t2 ON t1.KEY_COMPETITOR = t2.PROD_DESC
|
|
GROUP BY
|
|
1
|
|
"
|
|
& UsingLimit,
|
|
null,
|
|
[EnableFolding = true]
|
|
)
|
|
in
|
|
Source
|
|
```
|
|
|
|
annotation PBI_NavigationStepName = Navigation
|
|
|
|
annotation PBI_ResultType = Table
|
|
|
|
annotation TabularEditor_TableGroup = 04_DimTable
|
|
|