279 lines
6.4 KiB
Plaintext
279 lines
6.4 KiB
Plaintext
table Dim_Geo
|
|
lineageTag: aeec8d5d-c86c-4957-8592-3a153f08c3a8
|
|
|
|
column DATA_SOURCE
|
|
dataType: string
|
|
lineageTag: b8553d0a-9333-4148-a504-45df64984c85
|
|
summarizeBy: none
|
|
sourceColumn: DATA_SOURCE
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column AUDIT_COD
|
|
dataType: string
|
|
lineageTag: c4d4ba83-b9a7-4bf2-b7c1-52b72a5e8c64
|
|
summarizeBy: none
|
|
sourceColumn: AUDIT_COD
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column AUDIT_KEY = [AUDIT_COD] & [DATA_SOURCE] & [REGION_TYPE]
|
|
lineageTag: ad7b8a85-bcee-4e83-b855-5bba9eca0cb8
|
|
summarizeBy: none
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column REGION_TYPE
|
|
dataType: string
|
|
lineageTag: 8d11b6b5-f0ee-4989-b43e-9cc3d871feec
|
|
summarizeBy: none
|
|
sourceColumn: REGION_TYPE
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column PROVINCE_C
|
|
dataType: string
|
|
lineageTag: faea721c-723e-4a6f-a8fd-466367b20c59
|
|
summarizeBy: none
|
|
sourceColumn: PROVINCE_C
|
|
sortByColumn: PROV_RN
|
|
|
|
changedProperty = IsHidden
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CITY_C
|
|
dataType: string
|
|
lineageTag: 9ac48675-dc7e-4c17-bdee-b9b01c0ceda0
|
|
summarizeBy: none
|
|
sourceColumn: CITY_C
|
|
sortByColumn: CITY_RN
|
|
|
|
changedProperty = IsHidden
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column AZ_CITY_TIER
|
|
dataType: string
|
|
lineageTag: 4d853518-7ca3-4779-9fca-0a58ac0a90dd
|
|
summarizeBy: none
|
|
sourceColumn: AZ_CITY_TIER
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column AUDIT_SOURCE = [AUDIT_COD] & [DATA_SOURCE]
|
|
lineageTag: 09d9f35d-ec00-41e2-9f74-a9fb396745e8
|
|
summarizeBy: none
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column PROV_RN
|
|
dataType: int64
|
|
formatString: 0
|
|
lineageTag: b670be6c-3c55-47a6-a72d-273bc9d279d2
|
|
summarizeBy: sum
|
|
sourceColumn: PROV_RN
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CITY_RN
|
|
dataType: int64
|
|
formatString: 0
|
|
lineageTag: 8358fef1-3938-4aa7-a597-3862284f3926
|
|
summarizeBy: sum
|
|
sourceColumn: CITY_RN
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column PROVINCE_MAP
|
|
dataType: string
|
|
lineageTag: 2f1e99c3-ddee-4ee7-9096-f2b311ba56a8
|
|
summarizeBy: none
|
|
sourceColumn: PROVINCE_MAP
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column COUNTY_NAME
|
|
dataType: string
|
|
lineageTag: 31fb4942-21e7-4cbc-9f0f-1040ba2a27cb
|
|
summarizeBy: none
|
|
sourceColumn: COUNTY_NAME
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column COUNTY_TIER
|
|
dataType: string
|
|
lineageTag: 145266b5-5d87-4d57-ba70-385745a0d25b
|
|
summarizeBy: none
|
|
sourceColumn: COUNTY_TIER
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column PMT_REGION
|
|
dataType: string
|
|
lineageTag: afc28c11-8f63-4a52-bd3c-c9b568b1071e
|
|
summarizeBy: none
|
|
sourceColumn: PMT_REGION
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column PROVINCE_EN
|
|
dataType: string
|
|
lineageTag: 0de2113a-757f-47ee-8d37-e43a1fce5826
|
|
summarizeBy: none
|
|
sourceColumn: PROVINCE_EN
|
|
sortByColumn: PROV_RN
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column CITY_EN
|
|
dataType: string
|
|
lineageTag: 0f11f025-1ad5-4772-af6c-9ae5c2e77edb
|
|
summarizeBy: none
|
|
sourceColumn: CITY_EN
|
|
sortByColumn: CITY_RN
|
|
|
|
changedProperty = SortByColumn
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
column MERGED_DATA_CITY_C
|
|
dataType: string
|
|
lineageTag: 36ca5465-718a-48cc-b58e-8c5b18887fc6
|
|
summarizeBy: none
|
|
sourceColumn: MERGED_DATA_CITY_C
|
|
|
|
annotation SummarizationSetBy = Automatic
|
|
|
|
partition Dim_Geo = 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],
|
|
"
|
|
WITH external_geo AS (
|
|
SELECT
|
|
DISTINCT DATA_SOURCE,
|
|
AUDIT_COD,
|
|
REGION_TYPE,
|
|
PROVINCE_C,
|
|
CITY_C,
|
|
AZ_CITY_TIER,
|
|
PROV_RN,
|
|
CITY_RN,
|
|
PROVINCE_MAP,
|
|
COUNTY_NAME,
|
|
COUNTY_TIER,
|
|
PMT_REGION
|
|
FROM
|
|
DM.DM_TD_EXTERNAL_GEO
|
|
),
|
|
province_en AS (
|
|
SELECT
|
|
province_name,
|
|
province_name_en
|
|
FROM
|
|
dm.dm_td_geography
|
|
WHERE
|
|
province_name <> ''
|
|
and province_name is not null
|
|
GROUP BY 1,2
|
|
),
|
|
city_en AS (
|
|
SELECT
|
|
city_name,
|
|
city_name_en
|
|
FROM
|
|
dm.dm_td_geography
|
|
WHERE
|
|
city_name <> ''
|
|
and city_name is not null
|
|
GROUP BY 1,2
|
|
)
|
|
SELECT
|
|
a.DATA_SOURCE,
|
|
a.AUDIT_COD,
|
|
a.REGION_TYPE,
|
|
a.PROVINCE_C,
|
|
case
|
|
when a.PROVINCE_C = 'ROC' THEN 'ROC'
|
|
WHEN a.PROVINCE_C = '全国' then 'National'
|
|
ELSE prov.province_name_en
|
|
END as PROVINCE_EN,
|
|
nvl(city_shi.city_name,a.CITY_C) CITY_C,
|
|
nvl(city_shi.city_name,a.CITY_C) MERGED_DATA_CITY_C,
|
|
case
|
|
when a.CITY_C = 'ROC' THEN 'ROC'
|
|
WHEN a.CITY_C = '全国' then 'National'
|
|
WHEN a.CITY_C = '苏锡' THEN 'Suxichang'
|
|
WHEN a.PROVINCE_C = a.CITY_C then prov.province_name_en
|
|
WHEN city.city_name is null THEN city_shi.city_name_en
|
|
ELSE city.city_name_en
|
|
END as CITY_EN,
|
|
a.AZ_CITY_TIER,
|
|
a.PROV_RN,
|
|
a.CITY_RN,
|
|
a.PROVINCE_MAP,
|
|
a.COUNTY_NAME,
|
|
a.COUNTY_TIER,
|
|
a.PMT_REGION
|
|
FROM
|
|
external_geo a
|
|
LEFT JOIN province_en prov ON a.PROVINCE_C = prov.province_name
|
|
LEFT JOIN city_en city ON a.CITY_C = city.city_name
|
|
LEFT JOIN city_en city_shi on concat(a.CITY_C, '市') = city_shi.city_name
|
|
"
|
|
& UsingLimit,
|
|
null,
|
|
[
|
|
EnableFolding = true
|
|
]
|
|
)
|
|
in
|
|
Source
|
|
```
|
|
|
|
changedProperty = IsHidden
|
|
|
|
annotation PBI_ResultType = Table
|
|
|
|
annotation PBI_NavigationStepName = Navigation
|
|
|
|
annotation TabularEditor_TableGroup = 04_DimTable
|
|
|