mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-29 10:57:52 +00:00
feat(ingest): use node comment as description if existing else default to key (#2877)
This commit is contained in:
parent
3179f032de
commit
79218b1466
@ -68,6 +68,7 @@ class DBTNode:
|
||||
database: str
|
||||
schema: str
|
||||
name: str # name, identifier
|
||||
comment: str
|
||||
|
||||
datahub_urn: str
|
||||
|
||||
@ -132,6 +133,13 @@ def extract_dbt_entities(
|
||||
if "identifier" in node and not load_catalog:
|
||||
name = node["identifier"]
|
||||
|
||||
comment = key
|
||||
|
||||
if key in all_catalog_entities and all_catalog_entities[key]["metadata"].get(
|
||||
"comment"
|
||||
):
|
||||
comment = all_catalog_entities[key]["metadata"]["comment"]
|
||||
|
||||
materialization = None
|
||||
upstream_urns = []
|
||||
|
||||
@ -168,6 +176,7 @@ def extract_dbt_entities(
|
||||
node_type=node["resource_type"],
|
||||
max_loaded_at=sources_by_id.get(key, {}).get("max_loaded_at"),
|
||||
name=name,
|
||||
comment=comment,
|
||||
upstream_urns=upstream_urns,
|
||||
materialization=materialization,
|
||||
catalog_type=catalog_type,
|
||||
@ -430,7 +439,7 @@ class DBTSource(Source):
|
||||
)
|
||||
|
||||
dbt_properties = DatasetPropertiesClass(
|
||||
description=node.dbt_name,
|
||||
description=node.comment,
|
||||
customProperties=get_custom_properties(node),
|
||||
tags=[],
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user