dbt-column-lineage
This is a tool to visualize the column level lineage of dbt models. It uses the manifest.json and catalog.json files generated by dbt to create a graph of the lineage of the models. It is a web application that uses a FastAPI backend and a Next.js frontend.
Demo
Trace a column across models, then expand more columns to grow the lineage interactively.
The demo runs on the synthetic dbt project under
demo/(no warehouse required). Regenerate itsmanifest.json/catalog.jsonwithpython demo/build_demo_manifest.py.
There's also an edit / design mode (pencil button, bottom-right): edit existing models or sketch new ones — name, columns, and materialization type (table/view/incremental/snapshot/seed) — then share the design as a URL or export it as JSON.
📖 See the UI guide for a tour of every operation — exploring the graph, the CTE page, edit / design mode, Looker mode, deep links, and the design-snapshot JSON spec for generating designs programmatically (e.g. from CI or an LLM agent).
quickstart
Install dbt-column-lineage using pip:
pip install dbt-column-lineage
Run the following command:
# go to your dbt project directory
cd your-dbt-project/
# edit your model file
vi models/test.sql
# generate the manifest.json and catalog.json files
dbt docs generate
# set the environment variable for the dialect you are using
export SQLGLOT_DIALECT=snowflake
# Launch dbt-column-lineage with test.sql as the initial model
dbt-column-lineage run-params
development
To develop the application, you will need to run the backend and frontend separately.
git clone git@github.com:Oisix/dbt-column-lineage.git
cd dbt-column-lineage
for backend
activate venv and run the following commands:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -e ".[dev]"
uvicorn --app-dir src dbt_column_lineage.main:app --port=5000 --reload
for frontend
run the following commands:
npm install
npm run dev
after the frontend is running, Let's access http://localhost:3000
for Looker integration (optional)
If you want to integrate with Looker, you can use the following commands:
# set the environment variables
export LOOKERSDK_CLIENT_ID=(your client id)
export LOOKERSDK_CLIENT_SECRET=(your client secret)
export LOOKERSDK_BASE_URL=(your looker base url)
export LOOKER_IGNORE_FOLDERS=(comma separated list of folders to ignore)
export LOOKER_IGNORE_ELEMENTS=(comma separated list of dashboard elements to ignore)
# it analyzes the looker models; target/looker_analysis.json will be created
python tools/looker_analyzer.py
# rerun the backend
uvicorn --app-dir src dbt_column_lineage.main:app --port=5000 --reload
for Google OAuth login test (optional)
If you want to test the OAuth login, you can use the following commands:
export GOOGLE_CLIENT_ID=(your client id)
export GOOGLE_CLIENT_SECRET=(your client secret)
# fixed session signing key (see note below)
export SESSION_SECRET=$(python3 -c "import secrets; print(secrets.token_hex(32))")
docker build -t test .
docker run -p 5000:5000 -e USE_OAUTH=true -e GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET -e SESSION_SECRET=$SESSION_SECRET -e DEBUG_MODE=true test
SESSION_SECRET— The container runsuvicorn --workers 2(multiple processes), and a deployment may also scale out to multiple instances. Sessions are stored in a signed cookie, so every process must share the same signing key. WithUSE_OAUTH=true, set a fixedSESSION_SECRET(any stable random string) or sign-in breaks across workers (login loops / API401). If unset, each process generates its own random key (fine only for a single process). Without OAuth it is not needed.
CORS_ALLOW_ORIGINS— Comma-separated list of browser origins allowed to call the API cross-origin; defaults tohttp://localhost:3000(the frontend dev server). A normal deployment serves the frontend from the same origin as the API, so cross-origin requests never happen and this needs no change. Set it only if you host the frontend separately, and list the exact origins rather than*— the API allows credentials, so*would let any site read authenticated responses.
limiting heavy lineage queries (optional)
For very large projects a single request — e.g. reverse lineage of a hub column consumed by many models — can take a long time. Set MAX_LINEAGE_SECONDS to a wall-clock budget (seconds); when traversal exceeds it, the server stops and returns the partial result flagged truncated (the UI shows a banner) instead of hanging. Default -1 = unbounded. In a hosted deployment set it below your gateway's request timeout so you get 200 + truncated rather than a gateway timeout.
# example: cap lineage traversal at 100 seconds
export MAX_LINEAGE_SECONDS=100
Metadata
Release files for dbt-column-lineage 0.6.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbt_column_lineage-0.6.10.tar.gz | 1.8 MB | Without provenance | Details for dbt_column_lineage-0.6.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbt_column_lineage-0.6.10-py3-none-any.whl | Python 3 | none | any | Details for dbt_column_lineage-0.6.10-py3-none-any.whl |
Total release size: 2.7 MB
Release files / dbt_column_lineage-0.6.10.tar.gz
| Download URL | dbt_column_lineage-0.6.10.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f44490f06ca57982e63ee1f1f698d9f910f5ad457d799d09411fd0b2b4f3f2e
|
|
BLAKE2b-256 checksum How to use checksums |
5a3decd042170b4b5373be5164f945093cf452eb1a5c733c914a0e9ea011ed66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / dbt_column_lineage-0.6.10-py3-none-any.whl
| Download URL | dbt_column_lineage-0.6.10-py3-none-any.whl |
|---|---|
| Size | 842.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c65d9820893539749cdea02a2bd72367a171e3aafad3efff08e034eb2d80a00
|
|
BLAKE2b-256 checksum How to use checksums |
a70c7a8e4ec4eece9bf8b4277dff7d830646981f1cf92e0236274bc834697b94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for dbt-column-lineage 0.6.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.