fix(ingest): generate Airflow tags correctly (#2522)

This commit is contained in:
Harshal Sheth 2021-05-10 19:26:55 -07:00 committed by GitHub
parent e67279b8c3
commit 4b2a6bd46a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ def make_user_urn(username: str) -> str:
return f"urn:li:corpuser:{username}"
def make_tag_urn(tag: str) -> str:
return f"urn:li:tag:{tag}"
def make_data_flow_urn(
orchestrator: str, flow_id: str, cluster: str = DEFAULT_FLOW_CLUSTER
) -> str:

View File

@ -145,7 +145,7 @@ class DatahubAirflowLineageBackend(LineageBackend):
tags = models.GlobalTagsClass(
tags=[
models.TagAssociationClass(tag=f"airflow_{tag}")
models.TagAssociationClass(tag=builder.make_tag_urn(f"airflow_{tag}"))
for tag in (dag.tags or [])
]
)