airflow.providers.standard.utils.openlineage¶
Attributes¶
Functions¶
Safely inject OpenLineage parent task metadata into a DAG run conf. |
Module Contents¶
- airflow.providers.standard.utils.openlineage.safe_inject_openlineage_properties_into_dagrun_conf(dr_conf, ti)[source]¶
Safely inject OpenLineage parent task metadata into a DAG run conf.
This function checks whether the OpenLineage provider is accessible and supports parent information injection. If so, it enriches the DAG run conf with OpenLineage metadata about the parent task to improve lineage tracking. The function does not modify other conf fields, will not overwrite any existing content, and safely returns the original configuration if OpenLineage is unavailable, unsupported, or an error occurs during injection.
- Parameters:
dr_conf (dict | None) – The original DAG run configuration dictionary.
ti (airflow.models.TaskInstance | airflow.sdk.types.RuntimeTaskInstanceProtocol | None) – The TaskInstance whose metadata may be injected.
- Returns:
A potentially enriched DAG run conf with OpenLineage parent information, or the original conf if injection was skipped or failed.
- Return type:
dict | None