airflow.providers.dbt.cloud.utils.openlineage

Attributes

log

Functions

inject_parent_job_information_into_dbt_cloud_cause(...)

Replace the dbt Cloud run cause with OpenLineage parent job information as JSON.

generate_openlineage_events_from_dbt_cloud_run(...)

Generate OpenLineage events from the DBT Cloud run.

Module Contents

airflow.providers.dbt.cloud.utils.openlineage.log[source]
airflow.providers.dbt.cloud.utils.openlineage.inject_parent_job_information_into_dbt_cloud_cause(cause, task_instance)[source]

Replace the dbt Cloud run cause with OpenLineage parent job information as JSON.

This serializes the Airflow task’s OpenLineage parent (and root) run identifiers into the triggered run’s cause field. A consumer that reads dbt Cloud runs can parse this JSON and attach a ParentRunFacet, linking the dbt Cloud run back to the Airflow task that triggered it.

The dbt Cloud cause is limited to DBT_CAUSE_MAX_LENGTH characters. The essential parent link is always kept; the root block is dropped if the two together do not fit. If even the parent-only payload does not fit, the original cause is returned unchanged.

airflow.providers.dbt.cloud.utils.openlineage.generate_openlineage_events_from_dbt_cloud_run(operator, task_instance)[source]

Generate OpenLineage events from the DBT Cloud run.

This function retrieves information about a DBT Cloud run, including the associated job, project, and execution details. It processes the run’s artifacts, such as the manifest and run results, in parallel for many steps. Then it generates and emits OpenLineage events based on the executed DBT tasks.

Parameters:
Returns:

An empty OperatorLineage object indicating the completion of events generation.

Return type:

airflow.providers.openlineage.extractors.OperatorLineage

Was this entry helpful?