LineageHolder is an abstraction to hold the lineage result analyzed by LineageAnalyzer at different level.
At the bottom, we have
sqllineage.core.holder.SubQueryLineageHolder to hold lineage at subquery level.
This is used internally for
sqllineage.core.analyzer.Analyzer, which generate
sqllineage.core.holder.StatementLineageHolder as the result of lineage at SQL statement level.
And to assemble multiple
sqllineage.core.holder.StatementLineageHolder into a DAG based data structure serving
for the final output, we have
- class sqllineage.core.holders.StatementLineageHolder[source]
Statement Level Lineage Result.
Based on SubQueryLineageHolder, StatementLineageHolder holds extra attributes like drop and rename
For drop, it is a Set[
For rename, it a Set[Tuple[
sqllineage.models.Table]], with the first table being original table before renaming and the latter after renaming.
- class sqllineage.core.holders.SQLLineageHolder(graph: DiGraph)[source]
The combined lineage result in representation of Directed Acyclic Graph.
graph – the Directed Acyclic Graph holding all the combined lineage result.
- property table_lineage_graph: DiGraph
The table level DiGraph held by SQLLineageHolder
- property column_lineage_graph: DiGraph
The column level DiGraph held by SQLLineageHolder
- static of(*args: StatementLineageHolder) SQLLineageHolder [source]
To assemble multiple