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.23.tar.gz (881.3 kB view details)

Uploaded Source

Built Distribution

dbt_column_lineage-0.5.23-py3-none-any.whl (792.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt_column_lineage-0.5.23.tar.gz
  • Upload date:
  • Size: 881.3 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.23.tar.gz
Algorithm Hash digest
SHA256 6139199ad386fe647d823fd78a849643b3f82ff2d6e9052ca80f6e47802573ed
MD5 4dd5f4b02545364189d5932d1e98bf53
BLAKE2b-256 a71c5191bf9f39ebb9ad7854e534be99feb9765d0661647d03d7ff0c1cb17f44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbt_column_lineage-0.5.23-py3-none-any.whl
Algorithm Hash digest
SHA256 30dc867b2b102b00f23f1cc56f95d8fe78e48611c56b2dbe302fd44ac2040b13
MD5 78c34b4d36d2a730a72dad8247e8b6ea
BLAKE2b-256 0fc31eb4426570603b22c909b9c9b48a7b3fcff476cad413a2d109b007e14966

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