Skip to main content

A tool for dbt column lineage

Project description

dbt-column-lineage

This is a tool to visualize the colulmn 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 Flask backend and a Next.js frontend.

PyPI - Version PyPI - Python Version PyPI - Downloads PyPI - License

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-coloumn-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 -r requirements.txt

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 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)
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 DEBUG_MODE=true test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_column_lineage-0.5.24.tar.gz (881.4 kB view details)

Uploaded Source

Built Distribution

dbt_column_lineage-0.5.24-py3-none-any.whl (791.9 kB view details)

Uploaded Python 3

File details

Details for the file dbt_column_lineage-0.5.24.tar.gz.

File metadata

  • Download URL: dbt_column_lineage-0.5.24.tar.gz
  • Upload date:
  • Size: 881.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dbt_column_lineage-0.5.24.tar.gz
Algorithm Hash digest
SHA256 3218460cf93c03561618b64405cadd7ce4fafff26b4d590cac4aeae0ee36e2d7
MD5 d560fd029559e4f1a569218e3e011828
BLAKE2b-256 35bcb98d890b61d0e82693d9c2bebc5c7bdba78d060b48c3cd31c580eb5db26f

See more details on using hashes here.

File details

Details for the file dbt_column_lineage-0.5.24-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_column_lineage-0.5.24-py3-none-any.whl
Algorithm Hash digest
SHA256 e23216d7dcae8ab9b2faa7f6834dd15d94d743d420633bb3c544451e1fb92b75
MD5 b84dcea55a297c17acb1fb324bd427c6
BLAKE2b-256 7c5fed03596b3087187cf981de281823af63a0fcdceca14cbcb9cdd8f09ce5aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page