dbt-column-lineage 0.0.1a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dbt_column_lineage-0.0.1a0/.gitignore +7 -0
- dbt_column_lineage-0.0.1a0/Dockerfile +28 -0
- dbt_column_lineage-0.0.1a0/MANIFEST.in +2 -0
- dbt_column_lineage-0.0.1a0/PKG-INFO +86 -0
- dbt_column_lineage-0.0.1a0/README.md +62 -0
- dbt_column_lineage-0.0.1a0/data/.gitkeep +0 -0
- dbt_column_lineage-0.0.1a0/data/catalog.json +1 -0
- dbt_column_lineage-0.0.1a0/data/manifest.json +1 -0
- dbt_column_lineage-0.0.1a0/frontend/.env.development +1 -0
- dbt_column_lineage-0.0.1a0/frontend/.env.production +1 -0
- dbt_column_lineage-0.0.1a0/frontend/.eslintrc.json +3 -0
- dbt_column_lineage-0.0.1a0/frontend/.gitignore +36 -0
- dbt_column_lineage-0.0.1a0/frontend/README.md +36 -0
- dbt_column_lineage-0.0.1a0/frontend/next.config.mjs +8 -0
- dbt_column_lineage-0.0.1a0/frontend/package-lock.json +7513 -0
- dbt_column_lineage-0.0.1a0/frontend/package.json +42 -0
- dbt_column_lineage-0.0.1a0/frontend/postcss.config.js +6 -0
- dbt_column_lineage-0.0.1a0/frontend/public/next.svg +1 -0
- dbt_column_lineage-0.0.1a0/frontend/public/vercel.svg +1 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/cl/page.tsx +6 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/cte/page.tsx +6 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/favicon.ico +0 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/global.css +104 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/layout.tsx +20 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/login/page.tsx +12 -0
- dbt_column_lineage-0.0.1a0/frontend/src/app/page.tsx +45 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/molecules/EventNode.tsx +93 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/molecules/Node.tsx +96 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/organisms/Header.tsx +169 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/organisms/Sidebar.tsx +143 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/pages/Cl.tsx +184 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/pages/Cte.tsx +402 -0
- dbt_column_lineage-0.0.1a0/frontend/src/components/ui/Select.tsx +140 -0
- dbt_column_lineage-0.0.1a0/frontend/src/hooks/useGetWindowSize.ts +26 -0
- dbt_column_lineage-0.0.1a0/frontend/src/hooks/useToggle.ts +10 -0
- dbt_column_lineage-0.0.1a0/frontend/src/store/zustand.ts +22 -0
- dbt_column_lineage-0.0.1a0/frontend/tailwind.config.ts +15 -0
- dbt_column_lineage-0.0.1a0/frontend/tsconfig.json +26 -0
- dbt_column_lineage-0.0.1a0/pyproject.toml +48 -0
- dbt_column_lineage-0.0.1a0/requirements.txt +9 -0
- dbt_column_lineage-0.0.1a0/setup.cfg +4 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/__init__.py +10 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/_version.py +16 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/constants.py +9 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/404.html +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/5ZMn0zOtr-1D6MrZLJMgw/_buildManifest.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/5ZMn0zOtr-1D6MrZLJMgw/_ssgManifest.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/23-40b80cceb602a3a5.js +2 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/363642f4-0d7fe4f2a60fbca7.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/870fdd6f-e864c81fd4f46b85.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/907-281e78c0994e0272.js +24 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/985-8e0af4e25fd1fddd.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/app/_not-found/page-14a0e09681eaf8e8.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/app/cl/page-e832a15c50c95ebb.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/app/cte/page-2c901b736732d021.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/app/layout-befedf79c3572b97.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/app/login/page-e02c64b214f6b898.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/app/page-41c7f6cf0d39a63c.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/c37d3baf-13dd2aa5ac787e4c.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/fd9d1056-1f7bbca876e4d246.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/framework-b370f160bb96059c.js +33 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/main-423a18a29ac49e7b.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/main-app-b23a560c9c4caaf5.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/pages/_app-037b5d058bd9a820.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/pages/_error-6ae619510b1539d6.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/chunks/webpack-c05462f95054e9a4.js +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/css/9e54d6cbd920334c.css +5 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/css/b4846eed11c4725f.css +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/26a46d62cd723877-s.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/55c55f0601d81cf3-s.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/581909926a08bbc8-s.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/6d93bde91c0c2823-s.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/97e0cb1ae144a2a9-s.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/a34f9d1faa5f3315-s.p.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/cl.html +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/cl.txt +7 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/cte.html +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/cte.txt +7 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/favicon.ico +0 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/index.html +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/index.txt +7 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/login.html +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/login.txt +5 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/next.svg +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/frontend_out/vercel.svg +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/lineage.py +533 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/looker.py +157 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/main.py +228 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage/utils.py +36 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage.egg-info/PKG-INFO +86 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage.egg-info/SOURCES.txt +96 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage.egg-info/dependency_links.txt +1 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage.egg-info/entry_points.txt +2 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage.egg-info/requires.txt +14 -0
- dbt_column_lineage-0.0.1a0/src/dbt_column_lineage.egg-info/top_level.txt +1 -0
- dbt_column_lineage-0.0.1a0/test/.gitkeep +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
FROM node:21 as node-builder
|
|
2
|
+
WORKDIR /frontend
|
|
3
|
+
|
|
4
|
+
ENV NODE_ENV production
|
|
5
|
+
COPY frontend/package-lock.json frontend/package.json ./
|
|
6
|
+
RUN npm ci
|
|
7
|
+
COPY frontend .
|
|
8
|
+
RUN npm run build
|
|
9
|
+
|
|
10
|
+
FROM python:3.12 as python-builder
|
|
11
|
+
WORKDIR /app
|
|
12
|
+
|
|
13
|
+
COPY ./requirements.txt .
|
|
14
|
+
RUN pip install --upgrade pip && \
|
|
15
|
+
pip install --no-cache-dir -r requirements.txt
|
|
16
|
+
|
|
17
|
+
FROM python:3.12-slim-bookworm
|
|
18
|
+
|
|
19
|
+
WORKDIR /app
|
|
20
|
+
COPY --from=python-builder /usr/local/lib/python3.12/site-packages/ /usr/local/lib/python3.12/site-packages/
|
|
21
|
+
COPY --from=python-builder /usr/local/bin/uvicorn /usr/local/bin/
|
|
22
|
+
COPY data/*.json data/
|
|
23
|
+
|
|
24
|
+
WORKDIR /app/src/dbt_column_lineage
|
|
25
|
+
COPY src/dbt_column_lineage .
|
|
26
|
+
COPY --from=node-builder /frontend/out frontend_out
|
|
27
|
+
|
|
28
|
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--timeout-keep-alive", "600"]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dbt_column_lineage
|
|
3
|
+
Version: 0.0.1a0
|
|
4
|
+
Summary: A tool for dbt column lineage
|
|
5
|
+
Author-email: Your Name <your.email@example.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: sqlglot==24.1.0
|
|
12
|
+
Requires-Dist: fastapi==0.112.1
|
|
13
|
+
Requires-Dist: uvicorn==0.30.6
|
|
14
|
+
Requires-Dist: requests==2.31.0
|
|
15
|
+
Requires-Dist: pytz==2024.1
|
|
16
|
+
Requires-Dist: looker-sdk==24.4.0
|
|
17
|
+
Requires-Dist: python-liquid==1.12.1
|
|
18
|
+
Requires-Dist: itsdangerous==2.2.0
|
|
19
|
+
Requires-Dist: typer==0.12.5
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest; extra == "dev"
|
|
22
|
+
Requires-Dist: black; extra == "dev"
|
|
23
|
+
Requires-Dist: isort; extra == "dev"
|
|
24
|
+
|
|
25
|
+
# dbt-column-lineage
|
|
26
|
+
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.
|
|
27
|
+
|
|
28
|
+
# quickstart
|
|
29
|
+
|
|
30
|
+
To run the application, first clone the repository:
|
|
31
|
+
```
|
|
32
|
+
git clone git@github.com:Oisix/dbt-column-lineage.git
|
|
33
|
+
cd dbt-column-lineage
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Then copy the `manifest.json` and `catalog.json` files to the `data` directory:
|
|
37
|
+
```
|
|
38
|
+
export DBT_PROJECT_PATH=(your dbt project path)
|
|
39
|
+
cp $DBT_PROJECT_PATH/target/manifest.json data/manifest.json
|
|
40
|
+
cp $DBT_PROJECT_PATH/target/catalog.json data/catalog.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then build and run the docker container:
|
|
44
|
+
```
|
|
45
|
+
docker build -t dbt_column_lineage .
|
|
46
|
+
docker run -p 8000:8000 dbt_column_lineage
|
|
47
|
+
```
|
|
48
|
+
after the container is running,
|
|
49
|
+
Let's access http://localhost:8000
|
|
50
|
+
|
|
51
|
+
# development
|
|
52
|
+
|
|
53
|
+
To develop the application, you will need to run the backend and frontend separately.
|
|
54
|
+
|
|
55
|
+
## for backend
|
|
56
|
+
|
|
57
|
+
activate venv and run the following commands:
|
|
58
|
+
```
|
|
59
|
+
python3 -m venv venv
|
|
60
|
+
source venv/bin/activate
|
|
61
|
+
|
|
62
|
+
pip install --upgrade pip
|
|
63
|
+
pip install -r requirements.txt
|
|
64
|
+
|
|
65
|
+
python src/app.py
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## for frontend
|
|
69
|
+
|
|
70
|
+
run the following commands:
|
|
71
|
+
```
|
|
72
|
+
npm install
|
|
73
|
+
npm run dev
|
|
74
|
+
```
|
|
75
|
+
after the frontend is running,
|
|
76
|
+
Let's access http://localhost:3000
|
|
77
|
+
|
|
78
|
+
## for Google OAuth login test (optional)
|
|
79
|
+
|
|
80
|
+
If you want to test the OAuth login, you can use the following commands:
|
|
81
|
+
```
|
|
82
|
+
export GOOGLE_CLIENT_ID=(your client id)
|
|
83
|
+
export GOOGLE_CLIENT_SECRET=(your client secret)
|
|
84
|
+
docker build -t test .
|
|
85
|
+
docker run -p 8000:8000 -e USE_OAUTH=true -e GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET -e DEBUG_MODE=true test
|
|
86
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# dbt-column-lineage
|
|
2
|
+
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.
|
|
3
|
+
|
|
4
|
+
# quickstart
|
|
5
|
+
|
|
6
|
+
To run the application, first clone the repository:
|
|
7
|
+
```
|
|
8
|
+
git clone git@github.com:Oisix/dbt-column-lineage.git
|
|
9
|
+
cd dbt-column-lineage
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Then copy the `manifest.json` and `catalog.json` files to the `data` directory:
|
|
13
|
+
```
|
|
14
|
+
export DBT_PROJECT_PATH=(your dbt project path)
|
|
15
|
+
cp $DBT_PROJECT_PATH/target/manifest.json data/manifest.json
|
|
16
|
+
cp $DBT_PROJECT_PATH/target/catalog.json data/catalog.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Then build and run the docker container:
|
|
20
|
+
```
|
|
21
|
+
docker build -t dbt_column_lineage .
|
|
22
|
+
docker run -p 8000:8000 dbt_column_lineage
|
|
23
|
+
```
|
|
24
|
+
after the container is running,
|
|
25
|
+
Let's access http://localhost:8000
|
|
26
|
+
|
|
27
|
+
# development
|
|
28
|
+
|
|
29
|
+
To develop the application, you will need to run the backend and frontend separately.
|
|
30
|
+
|
|
31
|
+
## for backend
|
|
32
|
+
|
|
33
|
+
activate venv and run the following commands:
|
|
34
|
+
```
|
|
35
|
+
python3 -m venv venv
|
|
36
|
+
source venv/bin/activate
|
|
37
|
+
|
|
38
|
+
pip install --upgrade pip
|
|
39
|
+
pip install -r requirements.txt
|
|
40
|
+
|
|
41
|
+
python src/app.py
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## for frontend
|
|
45
|
+
|
|
46
|
+
run the following commands:
|
|
47
|
+
```
|
|
48
|
+
npm install
|
|
49
|
+
npm run dev
|
|
50
|
+
```
|
|
51
|
+
after the frontend is running,
|
|
52
|
+
Let's access http://localhost:3000
|
|
53
|
+
|
|
54
|
+
## for Google OAuth login test (optional)
|
|
55
|
+
|
|
56
|
+
If you want to test the OAuth login, you can use the following commands:
|
|
57
|
+
```
|
|
58
|
+
export GOOGLE_CLIENT_ID=(your client id)
|
|
59
|
+
export GOOGLE_CLIENT_SECRET=(your client secret)
|
|
60
|
+
docker build -t test .
|
|
61
|
+
docker run -p 8000:8000 -e USE_OAUTH=true -e GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET -e DEBUG_MODE=true test
|
|
62
|
+
```
|
|
File without changes
|