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.
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
Built Distribution
File details
Details for the file dbt_column_lineage-0.5.25.tar.gz
.
File metadata
- Download URL: dbt_column_lineage-0.5.25.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b21b6a29455314fa23ad40e671a7a730d3aa86e1f3f447d667d134307404b56a |
|
MD5 | c53a0d364ac176350dee4aa61f49a6e7 |
|
BLAKE2b-256 | 9c6df9e58382c7736dcf00c7c53e136758badafa7fb3e7ff3d3bee275c614646 |
File details
Details for the file dbt_column_lineage-0.5.25-py3-none-any.whl
.
File metadata
- Download URL: dbt_column_lineage-0.5.25-py3-none-any.whl
- Upload date:
- Size: 791.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1466630f0090e16038ebaec45f42a619d55119551edc8451e331727370bc77 |
|
MD5 | 1dc19a922b755560c972f203f4eb7f48 |
|
BLAKE2b-256 | 3d9ede86e8d1ae17d5172159d1927f85e3b3a1491352b7ec9c5f9e87b2bf3e59 |