{"id":50955893,"url":"https://github.com/teo-sl/sql-lineage-tracker","last_synced_at":"2026-06-18T06:32:50.838Z","repository":{"id":363010635,"uuid":"1261457164","full_name":"teo-sl/sql-lineage-tracker","owner":"teo-sl","description":"SQL Lineage Tracker is a powerful static analysis tool that parses raw SQL files to generate interactive table-level and column-level Data Lineage graphs.","archived":false,"fork":false,"pushed_at":"2026-06-07T00:37:01.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T03:32:07.344Z","etag":null,"topics":["automation","lineage","postgres","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teo-sl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T17:57:34.000Z","updated_at":"2026-06-07T00:46:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/teo-sl/sql-lineage-tracker","commit_stats":null,"previous_names":["teo-sl/sql-lineage-tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/teo-sl/sql-lineage-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teo-sl%2Fsql-lineage-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teo-sl%2Fsql-lineage-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teo-sl%2Fsql-lineage-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teo-sl%2Fsql-lineage-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teo-sl","download_url":"https://codeload.github.com/teo-sl/sql-lineage-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teo-sl%2Fsql-lineage-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34479553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","lineage","postgres","postgresql","sql"],"created_at":"2026-06-18T06:32:48.269Z","updated_at":"2026-06-18T06:32:50.832Z","avatar_url":"https://github.com/teo-sl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL Lineage Tracker\n\nSQL Lineage Tracker is a powerful static analysis tool that parses raw SQL files to generate interactive table-level and column-level Data Lineage graphs.\n\nIt deeply analyzes your SQL logic to identify Common Table Expressions (CTEs), Subqueries, `JOIN` conditions, and `WHERE` filters, creating an interactive DAG (Directed Acyclic Graph) of your data pipeline.\n\n## Features\n\n- **Column-Level Lineage**: Traces exactly which source columns contribute to the final outputs.\n- **Intermediate Node Parsing**: Does not flatten SQL! CTEs and Inline Subqueries are parsed as explicit nodes in the lineage graph.\n- **Filter and Join Extraction**: Captures join conditions and filters (WHERE/HAVING) applied to tables.\n- **Custom Schema/Function Support**: Accurately tracks dependencies through SQL functions.\n- **Interactive UI**: Outputs a beautiful, interactive HTML dashboard (via vis.js) to explore the lineage.\n  - Resize panels dynamically\n  - Hover to isolate a node's immediate neighborhood\n  - Click on column dependencies to jump through the warehouse graph\n- **Static Visualizations**: Generates Graphviz static PNG/SVG maps of table and column lineages.\n\n## Installation\n\nThis project is packaged with `pyproject.toml` and relies on `uv` or `pip`.\n\n```bash\n# Recommended: Install using uv\nuv sync\n\n# Or using pip\npip install .\n```\n\n## Usage\n\nYou can point the tool at any directory containing `.sql` files:\n\n```bash\n# Run via uv\nuv run sql-lineage examples/sql/ -i\n\n# Or if installed globally/in a venv\nsql-lineage examples/sql/ -i\n```\n\n### Options\n\n- `sql_dir`: The directory containing your SQL files.\n- `-i, --interactive`: Generate the interactive HTML viewer in addition to static images.\n- `-t, --target`: Specify the final table to trace back from (defaults to the last parsed file).\n- `-o, --output-dir`: Where to save the output graphs (defaults to `output/`).\n- `-f, --format`: Static image format: `png`, `svg`, or `pdf` (defaults to `png`).\n- `-d, --dialect`: SQL Dialect for parsing (defaults to `postgres`).\n\n## Examples\n\nWe've provided a set of example SQL files in the `examples/sql/` directory covering basic staging tables all the way to complex nested queries and financial reports. Run the command above to see the tool in action.\n\n## Built With\n- `sqlglot` - Pure Python SQL parser and transpiler\n- `graphviz` - Graph visualization\n- `vis.js` - Interactive browser networks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteo-sl%2Fsql-lineage-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteo-sl%2Fsql-lineage-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteo-sl%2Fsql-lineage-tracker/lists"}