Personal SQL lineage generator.
Project description
SQL Lineage 🔀
Personal SQL lineage generator.
Built on the following awesome libraries:
So... what is this? 🤔
[!NOTE]
This project is still in development and currently only parses the CTEs of an SQL query since that's all I need for now.
I write a lot of SQL, and I often need to understand "lineage" in lots of different ways.
Things like dbt and SQLMesh are great for object lineage (tables, columns, etc.), but I often need to understand "lineage" like the CTE lineage in a query, among other things.
This project is just a personal tool to help me generate lineage diagrams (in Mermaid syntax) for SQL queries to fit that requirement.
Upcoming improvements will (hopefully) include:
- Column lineage to Mermaid
- Semantic edges (e.g. distinguish between
JOIN
,WHERE
,UNION
, etc.) - Lineage for multiple files in a single diagram
Installation ⬇️
Grab a copy from PyPI like usual (note the bills-
prefix):
pip install bills-sql-lineage
Usage 📖
Pass the path to a SQL file to the lineage
command to generate the lineage as a Mermaid diagram:
lineage path/to/file.sql
This will write a Mermaid diagram to path/to/file.mermaid
. You can control the target with the second argument:
lineage path/to/file.sql path/to/output.mermaid
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bills_sql_lineage-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0760db74f1676f217a51576baae72425b103465800d53f1ea3c6d562a12f678 |
|
MD5 | 9d38839e87d045f5b26dea6c5c2fe6d2 |
|
BLAKE2b-256 | da8539af5822ae43d39d57a59422e75f6226f14bb2b554cbc6ee719a21e885ac |