tests.system.openlineage.example_openlineage_trigger_dag_deferrable

Simple DAG that triggers another simple DAG in deferrable mode.

It checks:
  • task’s trigger_dag_id, trigger_run_id, deferrable attribute

  • DAGRun START and COMPLETE events, for the triggered DAG

  • automatic injection of OL parent and root info, including job types, to DAGRun conf

  • multiple levels of triggering: the root stays the first Dag after two hops

  • in a task of the last Dag, the OpenLineage macros, called directly and rendered in templates through tojson: lineage_job_type() is the type of a task, lineage_root_job_type(ti) the type of a Dag, and lineage_root_job_name(ti) and lineage_root_run_id(ti) are this Dag and its Dag run’s runId, which this Dag passes down in the conf to compare

Attributes

DAG_ID

MACROS

TASK_JOB_TYPE

DAG_JOB_TYPE

trigger_dagrun

trigger_dagrun2

test_run

Functions

check_macros(job_type, root_job_type, root_job_name, ...)

Module Contents

tests.system.openlineage.example_openlineage_trigger_dag_deferrable.DAG_ID = 'openlineage_trigger_dag_deferrable'[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.MACROS = 'macros.OpenLineageProviderPlugin'[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.TASK_JOB_TYPE[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.DAG_JOB_TYPE[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.check_macros(job_type, root_job_type, root_job_name, root_run_id, expected_root_run_id, ti)[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.trigger_dagrun[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.trigger_dagrun2[source]
tests.system.openlineage.example_openlineage_trigger_dag_deferrable.test_run[source]

Was this entry helpful?