Skip to content

Commit e61b566

Browse files
committed
chore : get_column_names_and_descriptions column_type 가져오기
1 parent 9589538 commit e61b566

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

data_utils/datahub_source.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,18 @@ def get_column_names_and_descriptions(self, urn):
6464
columns = []
6565
if schema_metadata:
6666
for field in schema_metadata.fields:
67+
68+
# nativeDataType이 없거나 빈 문자열인 경우 None 처리
69+
native_type = getattr(field, "nativeDataType", None)
70+
column_type = (
71+
native_type if native_type and native_type.strip() else None
72+
)
73+
6774
columns.append(
6875
{
6976
"column_name": field.fieldPath,
7077
"column_description": field.description,
78+
"column_type": column_type,
7179
}
7280
)
7381
return columns

0 commit comments

Comments
 (0)