2025-03-21 16:00:05 -07:00
|
|
|
from datahub.sdk import DataHubClient, DatasetUrn
|
2023-05-03 07:32:23 +09:00
|
|
|
|
2025-03-21 16:00:05 -07:00
|
|
|
client = DataHubClient.from_env()
|
2023-05-03 07:32:23 +09:00
|
|
|
|
2025-03-21 16:00:05 -07:00
|
|
|
dataset = client.entities.get(
|
|
|
|
DatasetUrn(platform="hive", name="fct_users_created", env="PROD")
|
|
|
|
)
|
2023-05-03 07:32:23 +09:00
|
|
|
|
2025-03-21 16:00:05 -07:00
|
|
|
# Print descriptions for each column
|
|
|
|
column_descriptions = {}
|
|
|
|
for field in dataset.schema:
|
|
|
|
column_descriptions[field.field_path] = field.description
|
2023-05-03 07:32:23 +09:00
|
|
|
|
2025-03-21 16:00:05 -07:00
|
|
|
print(column_descriptions)
|