airflow.providers.openlineage.plugins.macros

Functions

lineage_job_namespace()

Macro function which returns Airflow OpenLineage namespace.

lineage_job_name(task_instance)

Macro function which returns Airflow task name in OpenLineage format (<dag_id>.<task_id>).

lineage_job_type()

Macro function which returns the OpenLineage job type facet fields of an Airflow task.

lineage_run_id(task_instance)

Macro function which returns the generated run id (UUID) for a given task.

lineage_parent_id(task_instance)

Macro function which returns a unique identifier of given task that can be used to create ParentRunFacet.

lineage_root_parent_id(task_instance)

Macro function which returns a unique identifier of given task that can be used to create root information for ParentRunFacet.

lineage_root_job_name(task_instance)

lineage_root_run_id(task_instance)

lineage_root_job_type(task_instance)

Macro function which returns the OpenLineage job type facet fields of the root job of given task.

lineage_root_job_namespace(task_instance)

Module Contents

airflow.providers.openlineage.plugins.macros.lineage_job_namespace()[source]

Macro function which returns Airflow OpenLineage namespace.

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_job_name(task_instance)[source]

Macro function which returns Airflow task name in OpenLineage format (<dag_id>.<task_id>).

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_job_type()[source]

Macro function which returns the OpenLineage job type facet fields of an Airflow task.

The result has the processingType, integration and jobType fields of the JobTypeJobFacet and can be forwarded to a child job together with the parent information. Note that a dictionary is returned, not a string - see the guide for how to use it in templates.

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_run_id(task_instance)[source]

Macro function which returns the generated run id (UUID) for a given task.

This can be used to forward the run id from a task to a child run so the job hierarchy is preserved.

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_parent_id(task_instance)[source]

Macro function which returns a unique identifier of given task that can be used to create ParentRunFacet.

This identifier is composed of the namespace, job name, and generated run id for given task, structured as ‘{namespace}/{job_name}/{run_id}’. This can be used to forward task information from a task to a child run so the job hierarchy is preserved. Child run can easily create ParentRunFacet from these information.

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_root_parent_id(task_instance)[source]

Macro function which returns a unique identifier of given task that can be used to create root information for ParentRunFacet.

This identifier is composed of the namespace, dag name, and generated run id for given dag, structured as ‘{namespace}/{job_name}/{run_id}’.

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_root_job_name(task_instance)[source]
airflow.providers.openlineage.plugins.macros.lineage_root_run_id(task_instance)[source]
airflow.providers.openlineage.plugins.macros.lineage_root_job_type(task_instance)[source]

Macro function which returns the OpenLineage job type facet fields of the root job of given task.

The result has the processingType, integration and jobType fields of the JobTypeJobFacet. The type is taken from the same source as the other lineage_root_* macros: DagRun conf root information, then DagRun conf parent information used as root, then the Dag of the task. None is returned if the root comes from the DagRun conf, but its job type is missing or invalid.

See also

For more information take a look at the guide: OpenLineage Job Hierarchy & Macros

airflow.providers.openlineage.plugins.macros.lineage_root_job_namespace(task_instance)[source]

Was this entry helpful?