# reata/sqllineage

SQL Lineage Analysis Tool powered by Python

Repository: https://github.com/reata/sqllineage
Canonical: https://ross.abutalabs.com/products/sqllineage
Language: Python
License: MIT
License Family: permissive
Topics: data-discovery, data-lineage, lineage, metadata, sql, data-governance
Last push: 2026-08-26T13:32:46+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 60, longevity 100
- inputs: {"age_days": 2661, "days_push": 7, "days_rel": 109, "gap_med": 107.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1675, forks 282 (observed 2026-08-28T04:05:20.494904+00:00)

## What it is
SQLLineage is a Python library and CLI tool that analyzes SQL statements to extract source and target table lineage without requiring users to understand SQL parser internals. It leverages sqlfluff and sqlparse under the hood and stores lineage results in a networkx graph.

## Use cases
- extract source and target tables from a SQL query
- analyze table-level lineage from SQL files
- identify intermediate tables across multiple SQL statements
- build column-level lineage for data governance
- visualize SQL data flow as a DAG
- audit ETL scripts for table dependencies

## When to choose
- you need table or column lineage from SQL without writing parser code
- you want a simple CLI or Python API for SQL dependency analysis
- you're building data governance or metadata catalog tooling

## When to avoid
- you need a full SQL parser or SQL linter itself
- you need runtime query execution or query optimization
- your SQL dialect is unsupported by sqlfluff/sqlparse

## Facets
- artifact type: library
- maturity: active
- function: parser, cli, data-science, etl
- domain: databases, developer-tools, analytics
- platform: python, cli, cross-platform
- tags: sql-lineage, sql-parsing, data-governance, metadata, data-discovery, data-engineering

## Member repositories
- reata/sqllineage (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:20.494904+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:42:29.514114+00:00, confidence not recorded.
  - readme: https://github.com/reata/sqllineage (fetched 2026-08-28T04:05:20.494904+00:00, sha 6d6df435a09a)
  - registry_pypi: https://pypi.org/pypi/sqllineage/json (fetched 2026-08-29T11:15:15.208300+00:00, sha 3c939d99eef1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
