mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-03 23:28:11 +00:00
18 lines
472 B
Python
18 lines
472 B
Python
![]() |
from datahub.metadata.urns import DatasetUrn
|
||
|
from datahub.sdk.main_client import DataHubClient
|
||
|
from datahub.sdk.search_filters import FilterDsl as F
|
||
|
|
||
|
client = DataHubClient.from_env()
|
||
|
|
||
|
downstream_lineage = client.lineage.get_lineage(
|
||
|
source_urn=DatasetUrn(platform="snowflake", name="downstream_table"),
|
||
|
direction="downstream",
|
||
|
max_hops=2,
|
||
|
filter=F.and_(
|
||
|
F.platform("airflow"),
|
||
|
F.entity_type("dataJob"),
|
||
|
),
|
||
|
)
|
||
|
|
||
|
print(downstream_lineage)
|