Skip to content

Commit

Permalink
fix(ingest/airflow): Add log to dag emit (datahub-project#11880)
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es authored Nov 18, 2024
1 parent d660db1 commit 435792c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,17 @@ def on_task_instance_failed(
def on_dag_start(self, dag_run: "DagRun") -> None:
dag = dag_run.dag
if not dag:
logger.warning(
f"DataHub listener could not find DAG for {dag_run.dag_id} - {dag_run.run_id}. Dag won't be captured"
)
return

dataflow = AirflowGenerator.generate_dataflow(
config=self.config,
dag=dag,
)
dataflow.emit(self.emitter, callback=self._make_emit_callback())
logger.debug(f"Emitted DataHub DataFlow: {dataflow}")

event: MetadataChangeProposalWrapper = MetadataChangeProposalWrapper(
entityUrn=str(dataflow.urn), aspect=StatusClass(removed=False)
Expand Down

0 comments on commit 435792c

Please sign in to comment.