Skip to content

Commit 6fe7f5a

Browse files
committed
[DOP-31903] Bound Airflow task dependencies to the same parent DAG
1 parent 4b03f85 commit 6fe7f5a

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

data_rentgen/consumer/extractors/impl/airflow_task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def _enrich_job_dependencies(self, run: RunDTO, event: OpenLineageRunEvent) -> R
227227
name=f"{dag_info.dag_id}.{upstream_task_id}",
228228
location=run.job.location,
229229
type=JobTypeDTO("AIRFLOW_TASK"),
230+
parent_job=run.job.parent_job,
230231
),
231232
to_job=run.job,
232233
type="DIRECT_DEPENDENCY",
@@ -240,6 +241,7 @@ def _enrich_job_dependencies(self, run: RunDTO, event: OpenLineageRunEvent) -> R
240241
name=f"{dag_info.dag_id}.{downstream_task_id}",
241242
location=run.job.location,
242243
type=JobTypeDTO("AIRFLOW_TASK"),
244+
parent_job=run.job.parent_job,
243245
),
244246
type="DIRECT_DEPENDENCY",
245247
),

data_rentgen/db/scripts/seed/spark_yarn.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ def generate_spark_run_yarn(
215215
name="mart_layer_dag.mart_layer_task_dbt",
216216
location=parent_run.job.location,
217217
type=JobTypeDTO(type="AIRFLOW_TASK"),
218+
parent_job=JobDTO(
219+
name="mart_layer_dag",
220+
location=parent_run.job.location,
221+
type=JobTypeDTO(type="AIRFLOW_DAG"),
222+
),
218223
),
219224
to_job=parent_run.job,
220225
type="DIRECT_DEPENDENCY",

0 commit comments

Comments
 (0)