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
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_
with_ schema - Build the lineage graph for a column in a SQL query using optional schema metadata.