Skip to content

Commit 0695c60

Browse files
authored
Merge pull request #10 from rfdearborn/rfdearborn/clarify-readme
Clarify readme & handle snowflake's uppercase col names
2 parents 11b6203 + f34a708 commit 0695c60

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# dbt-docs-to-notion
22

3-
A Github action for exporting dbt model docs to a Notion database, where they can be conveniently consumed (especially by casual users in your org).
3+
A Github action for exporting dbt docs to a Notion database, where they can be conveniently consumed (especially by casual users in your org).
44

55
## Output
66

7-
A Notion database, within a parent page of your choosing, with records like this:
7+
A Notion database, within a parent page of your choosing, with records like this for each model that contain the same information as dbt docs:
88
![dbt docs to notion output](https://i.imgur.com/Y1EWj9l.png)
99

1010
## Usage
@@ -14,7 +14,12 @@ A Notion database, within a parent page of your choosing, with records like this
1414
In advance of using this action, you should:
1515

1616
1. [Create a new integration within your Notion workspace](https://www.notion.so/my-integrations)
17-
2. Have your Notion integration token and a working dbt `profiles.yml` accessible to your repo (I'd recommend using [Github's repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets); see example workflow below).
17+
2. Create a parent Notion page for the docs database and share it with the integration from above
18+
3. Have your Notion integration token and a working dbt `profiles.yml` accessible to your repo (I'd recommend using [Github's repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets); see example workflow below).
19+
20+
Ideally you should also write descriptions for models and columns as is a [best practice](https://docs.getdbt.com/docs/building-a-dbt-project/documentation#adding-descriptions-to-your-project).
21+
22+
> ❗️ Note: this program assumes schema-defined model and column names to be entirely lowercase.
1823
1924
### Inputs
2025

dbt_docs_to_notion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ def main():
227227
"text": {
228228
"content": (
229229
column_descriptions[col_name]
230-
if col_name in column_descriptions
230+
if col_name.lower() in column_descriptions
231231
else ''
232232
)
233233
},
234234
"plain_text": (
235235
column_descriptions[col_name]
236-
if col_name in column_descriptions
236+
if col_name.lower() in column_descriptions
237237
else ''
238238
)
239239
}

0 commit comments

Comments
 (0)