airflow.providers.openlineage.utils.sql_hook_lineage¶
Utilities for processing hook-level lineage and building per-query OpenLineage events.
Attributes¶
Functions¶
|
Process |
Module Contents¶
- airflow.providers.openlineage.utils.sql_hook_lineage.emit_lineage_from_sql_extras(task_instance, sql_extras, is_successful=True, dataset_filter=None)[source]¶
Process
sql_jobextras and emit per-query OpenLineage events.For each extra that contains sql text or job id:
Parse SQL via
get_openlineage_facets_with_sql()to obtain inputs, outputs and facets (schema enrichment, column lineage, etc.).Drop the inputs/outputs that dataset_filter excludes for the reporting hook.
Emit a separate START + COMPLETE/FAIL event pair (child job of the task).