LineageAnalyzer

LineageAnalyzer contains the core processing logic for one-statement SQL analysis.

At the core of analyzer is all kinds of sqllineage.core.handlers to handle the interested tokens and store the result in sqllineage.core.holders.

LineageAnalyzer

class sqllineage.core.analyzer.LineageAnalyzer[source]

SQL Statement Level Lineage Analyzer.

analyze(stmt: Statement) StatementLineageHolder[source]

to analyze the Statement and store the result into sqllineage.holders.StatementLineageHolder.

Parameters

stmt – a SQL statement parsed by sqlparse

SourceHandler

class sqllineage.core.handlers.source.SourceHandler[source]

Source Table & Column Handler.

TargetHandler

class sqllineage.core.handlers.target.TargetHandler[source]

Target Table Handler.

CTEHandler

class sqllineage.core.handlers.cte.CTEHandler[source]

Common Table Expression (With Queries) Handler.