sqllineage
SQL Lineage Analysis Tool powered by Python
Decision gist · record as of 2026-08-14
Yes. SQLLineage is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem in data governance and pipeline auditing. The MIT license imposes no restrictions. It is suitable for production use in both open-source and commercial contexts.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction installation with a pure-Python wheel.
- The package is actively maintained with a recent release and depends on well-established libraries (sqlparse, sqlfluff, networkx, rustworkx, sqlalchemy).
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects, with only attribution required.
last release 2026-05-16 (90 days) · last repo commit 2026-08-10 · 1,675 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,725,919 downloads/mo, #3,611 on PyPI
Alternatives
Verify before relying
pip install sqllineage
from sqllineage.runner import LineageRunner
runner = LineageRunner("INSERT INTO db1.table1 SELECT * FROM db2.table2")
print(runner.source_tables)
print(runner.target_tables)- Performance characteristics with very large SQL files or complex multi-statement queries.
- Completeness of dialect support beyond the documented examples.
- Whether metadata-awareness via sqlalchemy connection strings is production-tested across all supported databases.
What it is and what it does
SQLLineage is a Python tool that analyzes SQL statements to extract data lineage—the flow of data from source tables through transformations to target tables. It abstracts away the complexity of SQL parsing by using pluggable parsers (sqlfluff and sqlparse) and stores lineage information in a graph structure using networkx. The tool works at both table and column levels, identifying which tables are read and written, and tracking individual column transformations across joins, aggregations, and CTEs.
You can use it as a command-line tool to analyze SQL files or inline queries, or import it as a library in Python code. It supports dialect-aware parsing, can optionally integrate with live database metadata via sqlalchemy to resolve wildcards and ambiguous column references, and includes graph visualization of lineage as a DAG. It handles multiple SQL statements in sequence, identifying intermediate tables that serve as both targets and sources.
Use it for
- Audit data pipelines by tracing which source tables feed into a target table through multiple transformation steps.
- Generate data governance documentation showing column-level lineage for compliance and impact analysis.
- Detect unused intermediate tables or orphaned source tables in a multi-statement ETL script.
- Visualize DAG of table dependencies to understand data flow in complex SQL workflows.
- Resolve column ambiguities in JOIN-heavy queries by connecting to live database metadata.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
SQLLineage is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem in data governance and pipeline auditing. The MIT license imposes no restrictions. It is suitable for production use in both open-source and commercial contexts.
Install
sqllineage on PyPI
Before you install
Low friction installation with a pure-Python wheel. The package is actively maintained with a recent release and depends on well-established libraries (sqlparse, sqlfluff, networkx, rustworkx, sqlalchemy). Supports modern Python versions and has been in production use since 2019.
Requires Python 3.10 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects, with only attribution required.
Quickstart
pip install sqllineage
from sqllineage.runner import LineageRunner
runner = LineageRunner("INSERT INTO db1.table1 SELECT * FROM db2.table2")
print(runner.source_tables)
print(runner.target_tables)
Verify before relying
- Performance characteristics with very large SQL files or complex multi-statement queries.
- Completeness of dialect support beyond the documented examples.
- Whether metadata-awareness via sqlalchemy connection strings is production-tested across all supported databases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesnetworkxrustworkxsqlalchemysqlfluffsqlparse |
| Maintenance | Actively maintained 90 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,725,919 / month, #3,611 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPython |
Evidence: sqllineage-1.5.8-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sql dependency tracking”
- sqllineageSQLLineage parses SQL statements to extract and visualize data…
- collate-sqllineageAnalyzes SQL statements to extract source and target tables,…
- openlineage-sqlProvides a Python interface to a Rust-based SQL parser for extracting…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also collate-sqllineage · syntaqlite · openlineage-sql · sql-metadata · dbt-colibri · sqlglot · sqlvalidator · sqlglotrs · sqlfluff