Add owner and tags to Airflow DAGs (#9135)

This commit is contained in:
Pere Miquel Brull 2022-12-05 21:00:46 +01:00 committed by GitHub
parent 2baf6873b6
commit f3ad74f792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,6 +259,10 @@ def build_dag_configs(ingestion_pipeline: IngestionPipeline) -> dict:
or False,
"catchup": ingestion_pipeline.airflowConfig.pipelineCatchup or False,
"schedule_interval": ingestion_pipeline.airflowConfig.scheduleInterval,
"tags": [
"OpenMetadata",
ingestion_pipeline.pipelineType.value,
],
}
@ -297,6 +301,10 @@ def build_dag(
retries=0,
# each DAG will call its own OpenMetadataWorkflowConfig
on_failure_callback=partial(send_failed_status_callback, workflow_config),
# Add tag and ownership to easily identify DAGs generated by OM
owner=ingestion_pipeline.owner.name
if ingestion_pipeline.owner
else "openmetadata",
)
return dag