Skip to content

Commit 24b1c3d

Browse files
authored
Merge pull request #128 from #127
feat: 데이터셋 이름에 데이터베이스 정보를 추가
2 parents 28cb854 + b10218f commit 24b1c3d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

data_utils/datahub_source.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ def get_table_name(self, urn):
4747
urn, aspect_type=DatasetPropertiesClass
4848
)
4949
if dataset_properties:
50-
return dataset_properties.get("name", None)
50+
database_info = dataset_properties.get("customProperties", {}).get(
51+
"dbt_unique_id", ""
52+
)
53+
if database_info:
54+
database_info = database_info.split(".")[-2]
55+
else:
56+
database_info = ""
57+
table_info = dataset_properties.get("name", None)
58+
return database_info + "." + table_info
5159
return None
5260

5361
def get_table_description(self, urn):

0 commit comments

Comments
 (0)