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.21.tar.gz
.
File metadata
- Download URL: dbt_column_lineage-0.5.21.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9899fcb4f7bc5934c3d647ba2df694ebe1e5cf62ff616f36b1c5ac8e7a89d6eb |
|
MD5 | 7640211e119d52a19af89fb6e9505602 |
|
BLAKE2b-256 | b78c17f0a7c385d2cbab29f8dc0df2d2ef286ab57c1e73add60768dd63a18232 |
File details
Details for the file dbt_column_lineage-0.5.21-py3-none-any.whl
.
File metadata
- Download URL: dbt_column_lineage-0.5.21-py3-none-any.whl
- Upload date:
- Size: 792.7 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 | 23aa06f747942aeb906c798843fe58fdbaec16993734ad26618fa11ea26e0f0e |
|
MD5 | f8fc19272f56184a7e427ecf4b223b0e |
|
BLAKE2b-256 | 93347994720b7f668160396cc40246225cce7443d5f41bebf9487107d42d7142 |