SQL

SQL Lineage Extractor

Reads write statements and lists which source tables feed which target tables.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste the statements that write data: INSERT, CREATE TABLE AS, CREATE VIEW, UPDATE or MERGE.
  2. Select Extract lineage for the source-to-target table, or As a diagram for Mermaid source.
  3. Download the CSV to attach to a design document or a change request.

What sql lineage extractor does

Lineage answers a simple question that is usually hard to answer: where did this table’s data come from. This reads INSERT, CREATE TABLE AS, CREATE VIEW, UPDATE and MERGE statements and produces one row per source-to-target edge, marking sources that are actually CTE names defined in the same statement.

This is statement-level lineage from the SQL you paste. It does not know about jobs that run outside these statements, loads performed by a tool rather than by SQL, or which specific column feeds which — that is column-level lineage and needs more than text. Use it to map a script you already have; do not treat it as a complete picture of a platform.

Frequently asked questions

No, it is statement-level: which tables feed which target table. Column-level lineage requires resolving every expression and alias against the real schema, which text alone cannot support reliably.

INSERT INTO, CREATE TABLE AS, CREATE VIEW and materialized view definitions, UPDATE and MERGE. A plain SELECT has no target, so it produces no lineage edge.

Use it as a starting point. It is accurate about the SQL you pasted and silent about everything else — loads run by a tool rather than by SQL, jobs in another repository, and anything that has changed since the script was written.

Further reading