initial
This commit is contained in:
@@ -0,0 +1,246 @@
|
||||
table Dim_MKTPackMapping
|
||||
lineageTag: 4faa718f-9d72-42fd-b611-ae3456efb818
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: f929b590-3327-45cc-9bdd-3e36fb798a43
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES
|
||||
dataType: string
|
||||
lineageTag: 39cca25f-cf41-44b3-bf88-1060c058728e
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_C
|
||||
dataType: string
|
||||
lineageTag: f5a2d4f4-ef98-472c-a8c5-e10d4157861b
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 236ff874-0645-4a1b-a952-a4584bbe3b90
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS
|
||||
dataType: string
|
||||
lineageTag: a9af738b-c6a7-45bf-aaa1-457f6c190515
|
||||
summarizeBy: none
|
||||
sourceColumn: CLASS
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VALUE_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: ed9c1da4-f249-48ec-9a22-35fa2aec2850
|
||||
summarizeBy: sum
|
||||
sourceColumn: VALUE_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column UNIT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: 3aa2947e-e094-4d49-a034-c0d2db024515
|
||||
summarizeBy: sum
|
||||
sourceColumn: UNIT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column COUNTINGUNIT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: c7debf53-3444-481a-9f21-5e3c5710b2c0
|
||||
summarizeBy: sum
|
||||
sourceColumn: COUNTINGUNIT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 68d2c6a9-3b5f-4c1b-8e10-bea75569a878
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: 3831b652-2df2-4a51-bafc-021966147422
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS_SOURCE = [MARKET] & [CLASS] & [DATA_SOURCE]
|
||||
lineageTag: 24a198f0-9134-4367-aa72-b975194438a1
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: a1e06cb5-6f0c-4e69-8c96-286c90adfe28
|
||||
summarizeBy: sum
|
||||
sourceColumn: PDOT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column CLASS_DES = [CLASS]
|
||||
lineageTag: 8773177c-36be-440f-b0bf-5b64d1d4141e
|
||||
summarizeBy: none
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = [PACK_COD] & [DATA_SOURCE] & [new_code]
|
||||
lineageTag: 893f7007-fe3e-404e-a05d-eceab4cc7571
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEY_COMPETITOR
|
||||
dataType: string
|
||||
lineageTag: 609d6b37-69a6-43ab-9b56-71cfdbfa60a0
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column NEW_CODE
|
||||
dataType: string
|
||||
lineageTag: 75a3a5f0-6b3e-4001-9623-c7fa4ac45f53
|
||||
summarizeBy: none
|
||||
sourceColumn: NEW_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_DES =
|
||||
RELATED(Dim_PackInfo[CMPS_DES])
|
||||
// LOOKUPVALUE(Dim_PackInfo[CMPS_DES],Dim_PackInfo[PACK_SOURCE],[PACK_SOURCE])
|
||||
lineageTag: 63d4ad34-76a2-4200-b785-b22d45447d9c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MOLECULE_SOURCE = [CMPS_DES] & [DATA_SOURCE]
|
||||
lineageTag: 4ebdb8a9-984b-43cb-9326-46d0a83c33f0
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEY_COMPETITOR_CN
|
||||
dataType: string
|
||||
lineageTag: 3b7b1fd2-727c-4357-958c-60a9c0b21edb
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR_CN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_TEXT = "counting unit"
|
||||
lineageTag: c9c27571-87a3-4ca2-9039-5b480a80c43d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_MARKET_RATIO_LEVEL = LOOKUPVALUE(Config_MarketRatio[brandratio_countingunit_level],Config_MarketRatio[MARKET],[MARKET],Config_MarketRatio[PACK_COD],[PACK_COD])
|
||||
lineageTag: 4538708d-0b3c-4676-8ba5-8c3c948fb07a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AIA_Remove
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 7f57ca04-d157-4e79-b8ef-c31fb5f2b36e
|
||||
summarizeBy: sum
|
||||
sourceColumn: AIA_Remove
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_MKTPackMapping = 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 DISTINCT
|
||||
A.PACK_COD,
|
||||
A.PROD_DES,
|
||||
A.PROD_DES_C,
|
||||
A.MARKET,CLASS,
|
||||
CAST(VALUE_MARKET_RATIO AS DECIMAL(38, 20)) VALUE_MARKET_RATIO,
|
||||
CAST(UNIT_MARKET_RATIO AS DECIMAL(38, 20)) UNIT_MARKET_RATIO,
|
||||
CAST(COUNTINGUNIT_MARKET_RATIO AS DECIMAL(38, 20)) COUNTINGUNIT_MARKET_RATIO,
|
||||
CAST(PDOT_MARKET_RATIO AS DECIMAL(38, 20)) PDOT_MARKET_RATIO,
|
||||
A.DATA_SOURCE,
|
||||
A.KEY_COMPETITOR,A.KEY_COMPETITOR_CN,A.NEW_CODE,
|
||||
CASE WHEN B.hidden_market is not null THEN 0 ELSE 1 END AS AIA_Remove
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_MARKET_PACK_MAPPING A
|
||||
left join (
|
||||
select distinct
|
||||
hidden_market
|
||||
from dwd.dwd_gnd_ims_hidden_market
|
||||
where data_source = 'AIA') B
|
||||
on A.DATA_SOURCE = 'AIA(Monthly)' AND A.MARKET = B.hidden_market
|
||||
UNION ALL
|
||||
select
|
||||
'DTPOTHERS' as PACK_COD
|
||||
,'DTPOTHERS' as PROD_DES
|
||||
,'DTPOTHERS' as PROD_DES_C
|
||||
,'EGFR TKI Market' as MARKET
|
||||
,'Others' as CLASS
|
||||
,1 as VALUE_MARKET_RATIO
|
||||
,1 as UNIT_MARKET_RATIO
|
||||
,1 as COUNTINGUNIT_MARKET_RATIO
|
||||
,1 as PDOT_MARKET_RATIO
|
||||
,'DTP(Quarterly)' as DATA_SOURCE
|
||||
,'OTHERS' as KEY_COMPETITOR
|
||||
,'OTHERS' as KEY_COMPETITOR_CN
|
||||
,'' as NEW_CODE
|
||||
, 1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
Reference in New Issue
Block a user