rfdearborn / dbt-docs-to-notion Goto Github PK
View Code? Open in Web Editor NEWA github action for exporting dbt docs to a notion database
License: MIT License
A github action for exporting dbt docs to a notion database
License: MIT License
Hello @rfdearborn,
I went through the whole setup and successfully imported the first documented models in a Notion DB.
However, at some points, Github Actions fails because of a specific model documentation (and I do not know which).
Here is the error:
Traceback (most recent call last): File "/home/runner/work/_actions/rfdearborn/dbt-docs-to-notion/v1.0.9/dbt_docs_to_notion.py", line 513, in <module> main() File "/home/runner/work/_actions/rfdearborn/dbt-docs-to-notion/v1.0.9/dbt_docs_to_notion.py", line 413, in main "content": data['relation_name'][:2000] TypeError: 'NoneType' object is not subscriptable Error: Process completed with exit code 1.
My guess is that some model does not have a 'relation_name'. Could you help me on this topic ? Thank you !
It would be great if this action had a dbt-project-dir
option, for setting dbt's --project-dir
flag.
My dbt project lives in a sub-directory of my repo, which means I can't use this action as-is.
I tried setting DBT_PROJECT_DIR
as an environment variable which partially works, but unfortunately the python script looks for target/manifest.json
in the root dir so this still fails.
I use dbt + Snowflake. This successfully works and writes to Notion when I use model-records-to-write: "all"
, but does not work when choosing a specific model, such as stg_accounts
.
I've tried combinations in the workflow below, such as:
- name: dbt-docs-to-notion
uses: rfdearborn/[email protected]
with:
dbt-package: 'dbt-snowflake==1.4.1'
dbt-target: 'notion'
model-records-to-write: <Update this>
...
and I've entered:
model-records-to-write: "stg_accounts"
model-records-to-write: "STG_ACCOUNTS"
model-records-to-write: "my_database.schema.stg_accounts"
model-records-to-write: "MY_DATABASE.SCHEMA.STG_ACCOUNTS"
model-records-to-write: "schema.stg_accounts"
model-records-to-write: "SCHEMA.STG_ACCOUNTS"
and tried single quotes for all of the above, but none of these work. No errors show up in the workflow. Not sure what to do.
Any ideas?
Notice: A new release of pip is available: 22.0.4 -> 23.1 Notice: To update, run: pip install --upgrade pip Run dbt deps --profiles-dir ./ --target=github_actions 21:08:29 Encountered an error: 'str' object has no attribute 'get' 21:08:29 Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dbt/main.py", line 136, in main results, succeeded = handle_and_check(args) File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dbt/main.py", line 180, in handle_and_check user_config = read_user_config(flags.PROFILES_DIR) # This is read again later File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dbt/config/profile.py", line 74, in read_user_config user_config = coerce_dict_str(profile.get("config", {})) AttributeError: 'str' object has no attribute 'get'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.