dbt-column-lineage 0.1.1__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.
Files changed (52) hide show
  1. dbt_column_lineage-0.1.1/.gitignore +7 -0
  2. dbt_column_lineage-0.1.1/Dockerfile +27 -0
  3. dbt_column_lineage-0.1.1/PKG-INFO +85 -0
  4. dbt_column_lineage-0.1.1/README.md +62 -0
  5. dbt_column_lineage-0.1.1/data/.gitkeep +0 -0
  6. dbt_column_lineage-0.1.1/frontend/.env.development +1 -0
  7. dbt_column_lineage-0.1.1/frontend/.env.production +1 -0
  8. dbt_column_lineage-0.1.1/frontend/.eslintrc.json +3 -0
  9. dbt_column_lineage-0.1.1/frontend/.gitignore +36 -0
  10. dbt_column_lineage-0.1.1/frontend/README.md +36 -0
  11. dbt_column_lineage-0.1.1/frontend/next.config.mjs +8 -0
  12. dbt_column_lineage-0.1.1/frontend/package-lock.json +7513 -0
  13. dbt_column_lineage-0.1.1/frontend/package.json +42 -0
  14. dbt_column_lineage-0.1.1/frontend/postcss.config.js +6 -0
  15. dbt_column_lineage-0.1.1/frontend/public/next.svg +1 -0
  16. dbt_column_lineage-0.1.1/frontend/public/vercel.svg +1 -0
  17. dbt_column_lineage-0.1.1/frontend/src/app/cl/page.tsx +6 -0
  18. dbt_column_lineage-0.1.1/frontend/src/app/cte/page.tsx +6 -0
  19. dbt_column_lineage-0.1.1/frontend/src/app/favicon.ico +0 -0
  20. dbt_column_lineage-0.1.1/frontend/src/app/global.css +104 -0
  21. dbt_column_lineage-0.1.1/frontend/src/app/layout.tsx +20 -0
  22. dbt_column_lineage-0.1.1/frontend/src/app/login/page.tsx +12 -0
  23. dbt_column_lineage-0.1.1/frontend/src/app/page.tsx +45 -0
  24. dbt_column_lineage-0.1.1/frontend/src/components/molecules/EventNode.tsx +93 -0
  25. dbt_column_lineage-0.1.1/frontend/src/components/molecules/Node.tsx +96 -0
  26. dbt_column_lineage-0.1.1/frontend/src/components/organisms/Header.tsx +169 -0
  27. dbt_column_lineage-0.1.1/frontend/src/components/organisms/Sidebar.tsx +143 -0
  28. dbt_column_lineage-0.1.1/frontend/src/components/pages/Cl.tsx +184 -0
  29. dbt_column_lineage-0.1.1/frontend/src/components/pages/Cte.tsx +402 -0
  30. dbt_column_lineage-0.1.1/frontend/src/components/ui/Select.tsx +140 -0
  31. dbt_column_lineage-0.1.1/frontend/src/hooks/useGetWindowSize.ts +26 -0
  32. dbt_column_lineage-0.1.1/frontend/src/hooks/useToggle.ts +10 -0
  33. dbt_column_lineage-0.1.1/frontend/src/store/zustand.ts +22 -0
  34. dbt_column_lineage-0.1.1/frontend/tailwind.config.ts +15 -0
  35. dbt_column_lineage-0.1.1/frontend/tsconfig.json +26 -0
  36. dbt_column_lineage-0.1.1/pyproject.toml +51 -0
  37. dbt_column_lineage-0.1.1/requirements.txt +8 -0
  38. dbt_column_lineage-0.1.1/setup.cfg +4 -0
  39. dbt_column_lineage-0.1.1/src/dbt_column_lineage/__init__.py +8 -0
  40. dbt_column_lineage-0.1.1/src/dbt_column_lineage/_version.py +16 -0
  41. dbt_column_lineage-0.1.1/src/dbt_column_lineage/constants.py +9 -0
  42. dbt_column_lineage-0.1.1/src/dbt_column_lineage/lineage.py +533 -0
  43. dbt_column_lineage-0.1.1/src/dbt_column_lineage/looker.py +161 -0
  44. dbt_column_lineage-0.1.1/src/dbt_column_lineage/main.py +205 -0
  45. dbt_column_lineage-0.1.1/src/dbt_column_lineage/utils.py +36 -0
  46. dbt_column_lineage-0.1.1/src/dbt_column_lineage.egg-info/PKG-INFO +85 -0
  47. dbt_column_lineage-0.1.1/src/dbt_column_lineage.egg-info/SOURCES.txt +50 -0
  48. dbt_column_lineage-0.1.1/src/dbt_column_lineage.egg-info/dependency_links.txt +1 -0
  49. dbt_column_lineage-0.1.1/src/dbt_column_lineage.egg-info/entry_points.txt +2 -0
  50. dbt_column_lineage-0.1.1/src/dbt_column_lineage.egg-info/requires.txt +13 -0
  51. dbt_column_lineage-0.1.1/src/dbt_column_lineage.egg-info/top_level.txt +1 -0
  52. dbt_column_lineage-0.1.1/test/.gitkeep +0 -0
@@ -0,0 +1,7 @@
1
+ .idea
2
+ .envrc
3
+ data/catalog.json
4
+ data/manifest.json
5
+ deploy_aws.sh
6
+ test/*.py
7
+ out/*
@@ -0,0 +1,27 @@
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=node-builder /frontend/out frontend/out
21
+ COPY --from=python-builder /usr/local/lib/python3.12/site-packages/ /usr/local/lib/python3.12/site-packages/
22
+ COPY --from=python-builder /usr/local/bin/uvicorn /usr/local/bin/
23
+ COPY data/*.json data/
24
+ WORKDIR /app/src
25
+ COPY src .
26
+
27
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--timeout-keep-alive", "600"]
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.1
2
+ Name: dbt_column_lineage
3
+ Version: 0.1.1
4
+ Summary: A FastAPI application for dbt column lineage and dashboard management
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
+ Provides-Extra: dev
20
+ Requires-Dist: pytest; extra == "dev"
21
+ Requires-Dist: black; extra == "dev"
22
+ Requires-Dist: isort; extra == "dev"
23
+
24
+ # dbt-column-lineage
25
+ 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.
26
+
27
+ # quickstart
28
+
29
+ To run the application, first clone the repository:
30
+ ```
31
+ git clone git@github.com:Oisix/dbt-column-lineage.git
32
+ cd dbt-column-lineage
33
+ ```
34
+
35
+ Then copy the `manifest.json` and `catalog.json` files to the `data` directory:
36
+ ```
37
+ export DBT_PROJECT_PATH=(your dbt project path)
38
+ cp $DBT_PROJECT_PATH/target/manifest.json data/manifest.json
39
+ cp $DBT_PROJECT_PATH/target/catalog.json data/catalog.json
40
+ ```
41
+
42
+ Then build and run the docker container:
43
+ ```
44
+ docker build -t dbt_column_lineage .
45
+ docker run -p 8000:8000 dbt_column_lineage
46
+ ```
47
+ after the container is running,
48
+ Let's access http://localhost:8000
49
+
50
+ # development
51
+
52
+ To develop the application, you will need to run the backend and frontend separately.
53
+
54
+ ## for backend
55
+
56
+ activate venv and run the following commands:
57
+ ```
58
+ python3 -m venv venv
59
+ source venv/bin/activate
60
+
61
+ pip install --upgrade pip
62
+ pip install -r requirements.txt
63
+
64
+ python src/app.py
65
+ ```
66
+
67
+ ## for frontend
68
+
69
+ run the following commands:
70
+ ```
71
+ npm install
72
+ npm run dev
73
+ ```
74
+ after the frontend is running,
75
+ Let's access http://localhost:3000
76
+
77
+ ## for Google OAuth login test (optional)
78
+
79
+ If you want to test the OAuth login, you can use the following commands:
80
+ ```
81
+ export GOOGLE_CLIENT_ID=(your client id)
82
+ export GOOGLE_CLIENT_SECRET=(your client secret)
83
+ docker build -t test .
84
+ 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
85
+ ```
@@ -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
@@ -0,0 +1 @@
1
+ NEXT_PUBLIC_API_HOSTNAME=http://localhost:8000
@@ -0,0 +1 @@
1
+ NEXT_PUBLIC_API_HOSTNAME=''
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "next/core-web-vitals"
3
+ }
@@ -0,0 +1,36 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ /node_modules
5
+ /.pnp
6
+ .pnp.js
7
+ .yarn/install-state.gz
8
+
9
+ # testing
10
+ /coverage
11
+
12
+ # next.js
13
+ /.next/
14
+ /out/
15
+
16
+ # production
17
+ /build
18
+
19
+ # misc
20
+ .DS_Store
21
+ *.pem
22
+
23
+ # debug
24
+ npm-debug.log*
25
+ yarn-debug.log*
26
+ yarn-error.log*
27
+
28
+ # local env files
29
+ .env*.local
30
+
31
+ # vercel
32
+ .vercel
33
+
34
+ # typescript
35
+ *.tsbuildinfo
36
+ next-env.d.ts
@@ -0,0 +1,36 @@
1
+ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
+
21
+ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22
+
23
+ ## Learn More
24
+
25
+ To learn more about Next.js, take a look at the following resources:
26
+
27
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
+
30
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31
+
32
+ ## Deploy on Vercel
33
+
34
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
+
36
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -0,0 +1,8 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ reactStrictMode: false,
4
+ swcMinify: true,
5
+ output: 'export'
6
+ };
7
+
8
+ export default nextConfig;