Skip to content

Commit b10218f

Browse files
committed
feat: 데이터셋 이름에 데이터베이스 정보를 추가하여 반환 형식 개선
- DatahubMetadataFetcher 클래스에서 데이터셋의 이름에 dbt_unique_id를 포함하여 반환하도록 수정 - 데이터베이스 정보와 테이블 정보를 결합하여 반환 형식 개선
1 parent 28cb854 commit b10218f

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)