Expand description
Column Lineage Tracking
This module provides functionality to track column lineage through SQL queries, building a graph of how columns flow from source tables to the result set. Supports UNION/INTERSECT/EXCEPT, CTEs, derived tables, subqueries, and star expansion.
Structs§
- Lineage
Node - A node in the column lineage graph
- Lineage
Walker - Iterator for walking the lineage graph
- Query
Output - The ordered output description of a query.
Enums§
- Output
Column - One entry in a query’s ordered output description.
Functions§
- collect_
source_ tables - Recursively collect source table names from lineage graph
- expand_
cte_ stars - Expand SELECT * in CTEs by walking CTE definitions in order and propagating resolved column lists. This handles nested CTEs (e.g., cte2 AS (SELECT * FROM cte1)) which qualify_columns cannot resolve because it processes each SELECT independently.
- get_
source_ tables - Get all source tables from a lineage graph
- lineage
- Build the lineage graph for a column in a SQL query
- lineage_
at - Build the lineage graph for the column at a zero-based output ordinal.
- lineage_
at_ with_ schema - Build schema-aware lineage for the column at a zero-based output ordinal.
- lineage_
with_ schema - Build the lineage graph for a column in a SQL query using optional schema metadata.
- output_
columns - Return the ordered output description of a query.
- output_
columns_ with_ schema - Return the ordered output description of a query after schema-aware expansion.