This commit is contained in:
2026-03-29 14:24:01 +08:00
commit 3e0ef9086b
4321 changed files with 3174841 additions and 0 deletions

View File

@@ -0,0 +1,670 @@
table Fact_Sales
lineageTag: c6bdcb23-6f0c-4bd2-98b6-b3fd012d5ba6
column YYYYMM
dataType: string
lineageTag: 23a682d7-10d2-408f-9865-95266f1a1ce3
summarizeBy: none
sourceColumn: YYYYMM
annotation SummarizationSetBy = Automatic
column AUDIT_COD
dataType: string
lineageTag: beb744f3-a579-412a-bea8-ab630611d346
summarizeBy: none
sourceColumn: AUDIT_COD
annotation SummarizationSetBy = Automatic
column PACK_COD
dataType: string
lineageTag: b8a924a3-e6db-4466-8d17-5bafeec347d1
summarizeBy: none
sourceColumn: PACK_COD
annotation SummarizationSetBy = Automatic
column SALES_UNIT_CAL
dataType: double
lineageTag: 4c191e4c-b8cb-4d39-8065-fdad386c287b
summarizeBy: sum
sourceColumn: SALES_UNIT_CAL
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column SALES_UNIT_CAL_LY
dataType: double
lineageTag: 5c65cb87-1f7f-4c33-aa6f-da97d34a103d
summarizeBy: sum
sourceColumn: SALES_UNIT_CAL_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column SALES_VALUE_CAL
dataType: double
lineageTag: 939a3931-54b5-4324-a85c-52bee74d988e
summarizeBy: sum
sourceColumn: SALES_VALUE_CAL
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column SALES_VALUE_CAL_LY
dataType: double
lineageTag: cea5d4e3-5f3a-492b-bd17-57003088499b
summarizeBy: sum
sourceColumn: SALES_VALUE_CAL_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column CONUTING_UNIT
dataType: double
lineageTag: 787a5cf6-289e-49b7-bcfd-8852344c16f5
summarizeBy: sum
sourceColumn: CONUTING_UNIT
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column CONUTING_UNIT_LY
dataType: double
lineageTag: 51fe3ca5-db57-4a35-b743-7396f22bcb47
summarizeBy: sum
sourceColumn: CONUTING_UNIT_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column DATA_SOURCE
dataType: string
lineageTag: a22e0dd0-28e2-4c4e-9a09-ffdd0fe6e5a8
summarizeBy: none
sourceColumn: DATA_SOURCE
annotation SummarizationSetBy = Automatic
column CORP_COD
dataType: string
lineageTag: 74b507c4-e474-44e5-bb48-0ad38c5d6dd0
summarizeBy: none
sourceColumn: CORP_COD
annotation SummarizationSetBy = Automatic
column REGION_TYPE
dataType: string
lineageTag: 359fd39c-3483-4b5e-8499-122eeb4384b6
summarizeBy: none
sourceColumn: REGION_TYPE
annotation SummarizationSetBy = Automatic
column PLATFORM_TYPE
dataType: string
lineageTag: 7b863d28-ca16-425f-ac26-226896232a93
summarizeBy: none
sourceColumn: PLATFORM_TYPE
annotation SummarizationSetBy = Automatic
column STORE_NAME
dataType: string
lineageTag: 5564f599-7429-4168-8a17-dee7c12f5455
summarizeBy: none
sourceColumn: STORE_NAME
annotation SummarizationSetBy = Automatic
column STORE_TYPE
dataType: string
lineageTag: fa4ec6e7-6226-41f5-b3b9-f3b8725814af
summarizeBy: none
sourceColumn: STORE_TYPE
annotation SummarizationSetBy = Automatic
column PACK_FLAG
dataType: int64
formatString: 0
lineageTag: ff6e8255-fd6d-44fb-ad51-53c990a37dee
summarizeBy: sum
sourceColumn: PACK_FLAG
annotation SummarizationSetBy = Automatic
column PROD_FLAG
dataType: int64
formatString: 0
lineageTag: 5680c42d-22f3-434e-8e00-37d3a9e25c6e
summarizeBy: sum
sourceColumn: PROD_FLAG
annotation SummarizationSetBy = Automatic
column DTP_FLAG
dataType: int64
formatString: 0
lineageTag: 4893181d-0fde-4860-84c6-59d600239976
summarizeBy: sum
sourceColumn: DTP_FLAG
annotation SummarizationSetBy = Automatic
column COUNTY_FLAG = IF([REGION_TYPE] IN {"BBU_BU COUNTY","OBU_BU COUNTY","OBU COUNTY","BBU COUNTY"},1,0)
formatString: 0
lineageTag: 54d2f08a-99ae-4b56-8612-73a265a98b88
summarizeBy: sum
annotation SummarizationSetBy = Automatic
column GEO_FLAG =
SWITCH(TRUE(),
[DTP_FLAG]=1 && [PROD_FLAG]=2 &&[PACK_FLAG]=1,2,
[PROD_FLAG] = 1,1,
[PACK_FLAG] = 1,1,
0)
formatString: 0
lineageTag: f0871916-f337-41e8-8bd1-09493b73c7cf
summarizeBy: sum
annotation SummarizationSetBy = Automatic
column 'new store type' = SWITCH(Fact_Sales[STORE_TYPE],"第三方","POP","品牌店","SO","平台店","SO","自营旗舰","SO",Fact_Sales[STORE_TYPE])
lineageTag: 7367a83f-3785-41a0-84ad-8a9c03c3d17b
summarizeBy: none
annotation SummarizationSetBy = Automatic
column STORE_TYPE_SOURCE = [STORE_TYPE] & [DATA_SOURCE]
lineageTag: 1152f877-9d11-4ad8-a4e9-e56b2d9ae477
summarizeBy: none
annotation SummarizationSetBy = Automatic
column PLATFORM_TYPE_SOURCE = [PLATFORM_TYPE] & [DATA_SOURCE]
lineageTag: 3799fa82-b187-48de-9085-e7eb56137e2d
summarizeBy: none
annotation SummarizationSetBy = Automatic
column STORE_PLATFORM = [STORE_TYPE] & " - " & [PLATFORM_TYPE]
lineageTag: 8b9050d4-c7f6-4a0e-9d00-1aff75be6332
summarizeBy: none
annotation SummarizationSetBy = Automatic
column CMPS_FLAG
dataType: int64
formatString: 0
lineageTag: 39bd1fb6-6b57-4441-86fb-1158b6cc3335
summarizeBy: sum
sourceColumn: CMPS_FLAG
annotation SummarizationSetBy = Automatic
column PRESCRIPTION
dataType: int64
lineageTag: 7593dd08-7505-488d-88b8-8846d92930cc
summarizeBy: sum
sourceColumn: PRESCRIPTION
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column PRESCRIPTION_LY
dataType: int64
lineageTag: 6cfbf76b-2417-4aa4-b12c-320e847a799b
summarizeBy: sum
sourceColumn: PRESCRIPTION_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column DEPT_SOURCE = [dept_name] & [DATA_SOURCE]
lineageTag: d633ff86-610c-4194-9637-0943ed386d75
summarizeBy: none
annotation SummarizationSetBy = Automatic
column DEPT_NAME
dataType: string
lineageTag: 55ee1c72-c8d5-4bfc-8e89-bfec08ada73c
summarizeBy: none
sourceColumn: DEPT_NAME
annotation SummarizationSetBy = Automatic
column NEW_CODE
dataType: string
lineageTag: b5f41ab8-591f-4c00-be44-65868a16e880
summarizeBy: none
sourceColumn: NEW_CODE
annotation SummarizationSetBy = Automatic
column INST_CODE
dataType: string
lineageTag: 028d1aa1-41be-43d2-9fa0-977259a3c58f
summarizeBy: none
sourceColumn: INST_CODE
annotation SummarizationSetBy = Automatic
column AIA_HP_FLAG
dataType: int64
formatString: 0
lineageTag: 75af6441-c40e-4087-8a38-f72489993622
summarizeBy: sum
sourceColumn: AIA_HP_FLAG
annotation SummarizationSetBy = Automatic
column HP_SOURCE = [AIA_HP_FLAG] & [DATA_SOURCE]
lineageTag: 70317408-2faf-4425-a64c-912904705571
summarizeBy: none
annotation SummarizationSetBy = Automatic
column INST_SOURCE = [INST_CODE] & [DATA_SOURCE]
lineageTag: a4bfd8bf-f30f-4d48-9d28-6e3d6fb2023f
summarizeBy: none
annotation SummarizationSetBy = Automatic
column H_LEVEL
dataType: int64
lineageTag: 93973569-c447-41e6-b741-672a6539d97f
summarizeBy: sum
sourceColumn: H_LEVEL
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column REIMBURSE
dataType: string
lineageTag: 431ab1f8-1756-4589-9bd4-73ad3cd621bd
summarizeBy: none
sourceColumn: REIMBURSE
annotation SummarizationSetBy = Automatic
column REIMBURSE_TYPE
dataType: string
lineageTag: e0d76560-fc80-4d10-bd85-2ca6e37ae960
summarizeBy: none
sourceColumn: REIMBURSE_TYPE
annotation SummarizationSetBy = Automatic
column PRESCRIPTION_SOURCE = [PRESCRIPTION_TYPE] & [DATA_SOURCE]
lineageTag: f7a5c002-152a-4f10-b177-ef6b5cc21719
summarizeBy: none
annotation SummarizationSetBy = Automatic
column REIMBURSETYPE_SOURCE = [REIMBURSE_TYPE] & [DATA_SOURCE]
lineageTag: beb9f5b1-422d-4432-9d52-5083dad9f0db
summarizeBy: none
annotation SummarizationSetBy = Automatic
column REIMBURSE_SOURCE = [REIMBURSE] & [DATA_SOURCE]
lineageTag: 02bac298-0bb2-44d6-9c74-9bf37f75af03
summarizeBy: none
annotation SummarizationSetBy = Automatic
column PRESCRIPTION_TYPE
dataType: string
lineageTag: 45ea0f30-12b1-4e20-93ea-e5cb2d06828a
summarizeBy: none
sourceColumn: PRESCRIPTION_TYPE
annotation SummarizationSetBy = Automatic
column MOLECULE_SOURCE = RELATED(Dim_PackInfo[MOLECULE_SOURCE])
lineageTag: a321cab7-5b9d-475b-b7c3-ceb13dd25358
summarizeBy: none
annotation SummarizationSetBy = Automatic
column Temp_RemovBF202101 =
INT(
OR( [DATA_SOURCE] = "IQVIA-CHPA(Monthly)" && [DATE_KEY] >=DATE(2021,1,1), [DATA_SOURCE] <> "IQVIA-CHPA(Monthly)" ))
formatString: 0
lineageTag: 324acddb-9483-4766-af2f-d0bb8fe45c5c
summarizeBy: sum
annotation SummarizationSetBy = Automatic
column Is_SpecialFlag =
SWITCH(TRUE(),
LEFT([PACK_COD],4) = "AZP_",1,0)
formatString: 0
lineageTag: cb145333-c744-4a16-9fe9-83d1f15095df
summarizeBy: sum
annotation SummarizationSetBy = Automatic
column AIA_REMOVE
dataType: int64
formatString: 0
lineageTag: 030fa2f5-e4e8-4131-9ab6-ae10adfc23e0
summarizeBy: sum
sourceColumn: AIA_REMOVE
annotation SummarizationSetBy = Automatic
column MERGEDATA_FLAG
dataType: string
lineageTag: bd306596-c091-4a77-a860-c832a98c3144
summarizeBy: none
sourceColumn: MERGEDATA_FLAG
annotation SummarizationSetBy = Automatic
column MERGEDATA_FLAG_MKT
dataType: string
lineageTag: 969b33d4-3692-4790-8ddb-b063273f21d5
summarizeBy: none
sourceColumn: MERGEDATA_FLAG_MKT
annotation SummarizationSetBy = Automatic
column MERGEDATA_FLAG_CHAP_DTP_NOAIA = SWITCH(TRUE() ,[DATA_SOURCE] = "iqvia-chpa(monthly)" ,"CHPA",[DTP_FLAG] = 1,"DTP","Normal")
lineageTag: 5ddd1cab-ea1e-4ebd-93cb-158b66492f9c
summarizeBy: none
annotation SummarizationSetBy = Automatic
column MERGEDATA_FLAG_CHPA_DTP
dataType: int64
formatString: 0
lineageTag: dae76934-1c24-4f47-8c5b-fd70e2ea16c4
summarizeBy: sum
sourceColumn: MERGEDATA_FLAG_CHPA_DTP
annotation SummarizationSetBy = Automatic
column MERGEDATA_FLAG_DTP_NOROC
dataType: int64
formatString: 0
lineageTag: fe8a83cb-c9b9-4e9d-b424-a483d6abf25b
summarizeBy: sum
sourceColumn: MERGEDATA_FLAG_DTP_NOROC
annotation SummarizationSetBy = Automatic
column MERGED_DATA_DTP_OTHERS
dataType: string
lineageTag: 16de7a31-4835-44bc-bc88-038e8f7247a9
summarizeBy: none
sourceColumn: MERGED_DATA_DTP_OTHERS
changedProperty = DataType
annotation SummarizationSetBy = Automatic
column EGFR_FLAG
dataType: int64
formatString: 0
lineageTag: 43b1127c-5c48-406b-ab40-0c472b7b1677
summarizeBy: sum
sourceColumn: EGFR_FLAG
annotation SummarizationSetBy = Automatic
column MARKET
dataType: string
lineageTag: 21966263-d0e7-4bc3-b95c-3db2010f0210
summarizeBy: none
sourceColumn: MARKET
annotation SummarizationSetBy = Automatic
column KEY_COMPETITOR
dataType: string
lineageTag: 5fbec165-1466-44eb-a501-6fec51d21c47
summarizeBy: none
sourceColumn: KEY_COMPETITOR
annotation SummarizationSetBy = Automatic
column CLASS
dataType: string
lineageTag: 596c3b99-88bf-44c8-a737-e0b7a1289129
summarizeBy: none
sourceColumn: CLASS
annotation SummarizationSetBy = Automatic
column VA
dataType: double
lineageTag: d6f29008-5c8f-4bce-bd66-0b57e0afa571
summarizeBy: sum
sourceColumn: VA
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column UT
dataType: double
lineageTag: f68f84cd-5436-4d93-8df4-34a28dc9ba2e
summarizeBy: sum
sourceColumn: UT
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column CU
dataType: double
lineageTag: 9b94e5c5-a305-4f90-ba24-c22defb5bac1
summarizeBy: sum
sourceColumn: CU
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column PT
dataType: double
lineageTag: 1c19a79d-671e-4627-905a-cbe43e80bede
summarizeBy: sum
sourceColumn: PT
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column PDOT
dataType: double
lineageTag: decfefaa-7f37-49bb-90ae-385e15e39775
summarizeBy: sum
sourceColumn: PDOT
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column PDOT_LY
dataType: double
lineageTag: 88a70068-6dfb-4a6f-b40b-ab20bfced7a9
summarizeBy: sum
sourceColumn: PDOT_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column DATE_KEY
dataType: dateTime
formatString: Long Date
lineageTag: fc1ae13e-8c03-42b1-993e-7f50db89bb12
summarizeBy: none
sourceColumn: DATE_KEY
annotation SummarizationSetBy = Automatic
annotation UnderlyingDateTimeDataType = Date
column PACK_SOURCE
dataType: string
lineageTag: e8cee37b-717d-4299-9193-c20aa2b250be
summarizeBy: none
sourceColumn: PACK_SOURCE
annotation SummarizationSetBy = Automatic
column AUDIT_SOURCE
dataType: string
lineageTag: 80ac5806-8a7d-4ad8-97e0-7197b2707b11
summarizeBy: none
sourceColumn: AUDIT_SOURCE
annotation SummarizationSetBy = Automatic
column AUDIT_KEY
dataType: string
lineageTag: adfb79d9-d9eb-4b83-9881-86e79538ff86
summarizeBy: none
sourceColumn: AUDIT_KEY
annotation SummarizationSetBy = Automatic
column CLASS_KEY
dataType: string
lineageTag: 11d810a0-30ff-4e5e-996a-ae5f2378f10f
summarizeBy: none
sourceColumn: CLASS_KEY
annotation SummarizationSetBy = Automatic
column MARKET_KEY
dataType: string
lineageTag: f86c7bad-428a-4795-9025-867a1868033d
summarizeBy: none
sourceColumn: MARKET_KEY
annotation SummarizationSetBy = Automatic
partition Fact_Sales = m
mode: import
queryGroup: Fact_Sales
source = ```
let
Source =
Value.NativeQuery(
Databricks.Catalogs(
ServerAddress, HttpPath, [
Catalog = CatalogName,
Database = null,
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
]
){
[Name = CatalogName, Kind = "Database"]
}[Data],
"
select
DATA_SOURCE,
MARKET,
KEY_COMPETITOR,
CLASS,
YYYYMM,
PACK_COD,
AUDIT_COD,
VA,
UT,
CU,
PT,
SALES_UNIT_CAL,
SALES_UNIT_CAL_LY,
SALES_VALUE_CAL,
SALES_VALUE_CAL_LY,
CONUTING_UNIT,
CONUTING_UNIT_LY,
PDOT,
PDOT_LY,
PRESCRIPTION,
PRESCRIPTION_LY,
---关联主键-----------------------------
TO_DATE(CONCAT(YYYYMM, '01'), 'yyyyMMdd') AS DATE_KEY,
CONCAT(MARKET,DATA_SOURCE) AS MARKET_KEY,
CONCAT(PACK_COD,DATA_SOURCE,'') AS PACK_SOURCE,
CONCAT(AUDIT_COD,DATA_SOURCE) AS AUDIT_SOURCE,
CONCAT(AUDIT_COD,DATA_SOURCE,'' ) AS AUDIT_KEY,
CONCAT(MARKET,CLASS,DATA_SOURCE) AS CLASS_KEY,
-------------------------------------
--Retail藏数逻辑标签------------------
PACK_FLAG,
PROD_FLAG,
DTP_FLAG,
CMPS_FLAG,
-------------------------------------
--EC数据标签--------------------------
PLATFORM_TYPE,
STORE_NAME,
STORE_TYPE,
-------------------------------------
--COUNTY数据标签----------------------
REGION_TYPE,
--AIA数据标签-------------------------
INST_CODE,
AIA_HP_FLAG,
AIA_REMOVE,
-------------------------------------
--XIE HE 数据标签---------------------
NEW_CODE,
DEPT_NAME,
H_LEVEL,
REIMBURSE,
REIMBURSE_TYPE,
PRESCRIPTION_TYPE,
-------------------------------------
--Merged Data部分--------------------
MERGEDATA_FLAG,
MERGEDATA_FLAG_MKT,
MERGEDATA_FLAG_CHPA_DTP,
MERGEDATA_FLAG_DTP_NOROC,
MERGED_DATA_DTP_OTHERS,
EGFR_FLAG,
-------------------------------------
CORP_COD
from
DM.DM_TF_EXT_UNIONALL_SALES_MAPPING
--where
--DATA_SOURCE = 'THC(Quarterly)'
--and yyyymm >= 202501
"
& UsingLimit,
null,
[
EnableFolding = true
]
)
in
Source
```
annotation PBI_ResultType = Table
annotation PBI_NavigationStepName = Navigation
annotation TabularEditor_TableGroup = 05_FactTable