initial
This commit is contained in:
@@ -0,0 +1,201 @@
|
||||
table Fact_Sales_Total
|
||||
lineageTag: 66266824-1f74-413e-9407-eaefe5310c49
|
||||
|
||||
column YYYYMM
|
||||
dataType: string
|
||||
lineageTag: a21d6b7b-1fee-473f-b897-5576f106fbb5
|
||||
summarizeBy: none
|
||||
sourceColumn: YYYYMM
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 72479113-006e-440e-96b4-516001d70b1f
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SALES_UNIT_CAL
|
||||
dataType: double
|
||||
lineageTag: 9c702b06-b06e-453c-b013-744f8d03bec0
|
||||
summarizeBy: sum
|
||||
sourceColumn: SALES_UNIT_CAL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column SALES_UNIT_CAL_LY
|
||||
dataType: double
|
||||
lineageTag: 7f7ce86d-eb5c-4130-96b2-4056ee5fad02
|
||||
summarizeBy: sum
|
||||
sourceColumn: SALES_UNIT_CAL_LY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column SALES_VALUE_CAL
|
||||
dataType: double
|
||||
lineageTag: ad4a9b76-ca27-4435-94ae-adc3d9dbbe0a
|
||||
summarizeBy: sum
|
||||
sourceColumn: SALES_VALUE_CAL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column SALES_VALUE_CAL_LY
|
||||
dataType: double
|
||||
lineageTag: d1de8632-e5f2-40bb-82d3-240e8699aff3
|
||||
summarizeBy: sum
|
||||
sourceColumn: SALES_VALUE_CAL_LY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column CONUTING_UNIT
|
||||
dataType: double
|
||||
lineageTag: 243c84e7-50e5-4996-9b3e-06fbcab24285
|
||||
summarizeBy: sum
|
||||
sourceColumn: CONUTING_UNIT
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column CONUTING_UNIT_LY
|
||||
dataType: double
|
||||
lineageTag: 0be13c42-f1fc-4203-8698-80bbf13db95e
|
||||
summarizeBy: sum
|
||||
sourceColumn: CONUTING_UNIT_LY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: da0e75b9-f9b2-48d8-812a-051aaaca736c
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATE_KEY = DATE(LEFT([YYYYMM],4),RIGHT([YYYYMM],2),"01")
|
||||
formatString: General Date
|
||||
lineageTag: 98d2721b-1932-4b8e-8b96-df33b6e27753
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_COD
|
||||
dataType: string
|
||||
lineageTag: 584f06b1-5aa2-46cd-94e3-989336c635ca
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column REGION_TYPE
|
||||
dataType: string
|
||||
lineageTag: 7ce546d7-bfa2-45e4-bfa1-088d985553de
|
||||
summarizeBy: none
|
||||
sourceColumn: REGION_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PLATFORM_TYPE
|
||||
dataType: string
|
||||
lineageTag: 2eb1c33a-a4be-4774-8d7c-38c4b74fb100
|
||||
summarizeBy: none
|
||||
sourceColumn: PLATFORM_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column STORE_TYPE
|
||||
dataType: string
|
||||
lineageTag: 2c6aefe8-00b9-4b3c-bead-2bbb926f8434
|
||||
summarizeBy: none
|
||||
sourceColumn: STORE_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DTP_FLAG
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 587f4cf8-c7eb-40bd-888c-ac896333d998
|
||||
summarizeBy: sum
|
||||
sourceColumn: DTP_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'new store type' = SWITCH(Fact_Sales_Total[STORE_TYPE],"第三方","POP","品牌店","SO","平台店","SO","自营旗舰","SO",Fact_Sales_total[STORE_TYPE])
|
||||
lineageTag: 50b3306b-98e1-4d6c-bce9-f64c50775d26
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = [PACK_COD] & [DATA_SOURCE]
|
||||
lineageTag: 8fcd60be-ed1e-4060-973d-d6467dcf95e6
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PLATFORM_TYPE_SOURCE = [PLATFORM_TYPE] & [DATA_SOURCE]
|
||||
lineageTag: dd5a65dd-d9dd-403c-843c-19f7a4808a06
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column STORE_TYPE_SOURCE = [STORE_TYPE] & [DATA_SOURCE]
|
||||
lineageTag: 86591690-31e1-40b6-b955-5540cb31a54a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Fact_Sales_Total = 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 YYYYMM,PACK_COD,CORP_COD,PLATFORM_TYPE,STORE_TYPE,REGION_TYPE,DATA_SOURCE,DTP_FLAG,
|
||||
SUM(CASE WHEN SALES_UNIT_CAL = 0 THEN NULL ELSE CAST(SALES_UNIT_CAL AS DECIMAL(35,10)) END) SALES_UNIT_CAL,
|
||||
SUM(CASE WHEN SALES_UNIT_CAL_LY = 0 THEN NULL ELSE CAST(SALES_UNIT_CAL_LY AS DECIMAL(35,10)) END) SALES_UNIT_CAL_LY,
|
||||
SUM(CASE WHEN SALES_VALUE_CAL = 0 THEN NULL ELSE CAST(SALES_VALUE_CAL AS DECIMAL(35,10)) END) SALES_VALUE_CAL,
|
||||
SUM(CASE WHEN SALES_VALUE_CAL_LY = 0 THEN NULL ELSE CAST(SALES_VALUE_CAL_LY AS DECIMAL(35,10)) END) SALES_VALUE_CAL_LY,
|
||||
SUM(CASE WHEN CONUTING_UNIT = 0 THEN NULL ELSE CAST(CONUTING_UNIT AS DECIMAL(35,10)) END) CONUTING_UNIT,
|
||||
SUM(CASE WHEN CONUTING_UNIT_LY = 0 THEN NULL ELSE CAST(CONUTING_UNIT_LY AS DECIMAL(35,10)) END) CONUTING_UNIT_LY
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
WHERE YYYYMM >= (date_format(now(), 'yyyy')-3)*100+1
|
||||
GROUP BY YYYYMM,PACK_COD,CORP_COD,PLATFORM_TYPE,STORE_TYPE,REGION_TYPE,DATA_SOURCE,DTP_FLAG "
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 05_FactTable
|
||||
|
||||
Reference in New Issue
Block a user