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

Uploaded Source

Built Distribution

dbt_column_lineage-0.5.22-py3-none-any.whl (792.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt_column_lineage-0.5.22.tar.gz
  • Upload date:
  • Size: 881.2 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.22.tar.gz
Algorithm Hash digest
SHA256 d5f9efd5666ebe6addd71e2c0b47d77a80e4387ab2ef0085a6d3cbba9bd8edda
MD5 3247f306a4674a6774a57262938af159
BLAKE2b-256 2d00c490a4edbd73593b6c396893eb4160bce3eb82d616da2a4968e0b152a04c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbt_column_lineage-0.5.22-py3-none-any.whl
Algorithm Hash digest
SHA256 612f8361a84b1bca075ac90a08dbd44bdf9376359ef8ff8b48938d21888fbca8
MD5 038a5f30af5400f5f90a62770e5ff2a1
BLAKE2b-256 bbfda5b19ae4a37d2733319a6dec2025b0f84d6defca174d8b32aacb411e94b8

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