Skip to main content

lineage_with_schema

Function lineage_with_schema 

Source
pub fn lineage_with_schema(
    column: &str,
    sql: &Expression,
    schema: Option<&dyn Schema>,
    dialect: Option<DialectType>,
    trim_selects: bool,
) -> Result<LineageNode>
Expand description

Build the lineage graph for a column in a SQL query using optional schema metadata.

When schema is provided, the query is first qualified with optimizer::qualify_columns, allowing more accurate lineage for unqualified or ambiguous column references.

§Arguments

  • column - The column name to trace lineage for
  • sql - The SQL expression (SELECT, UNION, etc.)
  • schema - Optional schema used for qualification
  • dialect - Optional dialect for qualification and lineage handling
  • trim_selects - If true, trim the source SELECT to only include the target column

§Returns

The root lineage node for the specified column