-
Notifications
You must be signed in to change notification settings - Fork 967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify macro properties aren't supported in dbt_project.yml #3989
Conversation
✅ Deploy Preview for docs-getdbt-com ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
part of me wonders if i need a project.yml example seeing as the sentence says it supports all yaml files. 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for following up here @mirnawong1!
There's a distinction between attributes we call "configs" and attributes we call "properties," in that "configs" can be set for many resources at once in dbt_project.yml
, and "properties" can only be set for one resource at a time. The fact is that macros and analyses only have properties, and that's why they cannot be configured from dbt_project.yml
.
https://docs.getdbt.com/reference/configs-and-properties
I am very supportive of the idea of calling this out explicitly in the various resource pages! I will also just say, this distinction is historical & a bit arbitrary. We have been thinking on & off about how we might change it in the future:
dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries and strings are represented. | ||
::: | ||
|
||
The following is a list of all available configurations in the `dbt_project.yml` file. Something to note, [Macro properties](/reference/macro-properties) aren't supported in the `dbt_project.yml` file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend updating this note to mention that these configurations aren't supported in dbt_project.yml
:
- Macro properties: https://docs.getdbt.com/reference/macro-properties
- Analysis properties: https://docs.getdbt.com/reference/analysis-properties
- Semantic model configs (https://docs.getdbt.com/docs/build/semantic-models) — however we are adding support for this in v1.7 ! (Semantic model configs - enable/disable + groups dbt-core#8502)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait, sorry! i see the issue is related to groups only!
Co-authored-by: Matt Shaver <[email protected]>
Co-authored-by: Matt Shaver <[email protected]>
…tdbt.com into mwong-macro-yml
hey @dbeatty10 , can i request a tech review for this pr? since creating the pr, I've made the following changes per jerco's feedback:
|
You can use the docs property in YAML files, including the `dbt_project.yml`: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we remove all the changes related to website/docs/reference/resource-configs/docs.md
out of this PR and put them into a separate one instead?
We could provide code examples for dbt_project.yml
similar to enabled
Here's some code that should work:
name: "my_project"
version: "1.0.0"
config-version: 2
profile: "sandcastle"
models:
my_project:
+docs:
show: false
seeds:
my_project:
+docs:
show: false
snapshots:
my_project:
+docs:
show: false
So the generic code examples would look like this:
models:
[<resource-path>](/reference/resource-configs/resource-path):
+docs:
show: true | false
seeds:
[<resource-path>](/reference/resource-configs/resource-path):
+docs:
show: true | false
snapshots:
[<resource-path>](/reference/resource-configs/resource-path):
+docs:
show: true | false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @dbeatty10 , i moved it out of this pr and added it here: #4529
will address monday |
Remove duplicated content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these clarifications @mirnawong1 ! 🧠
These previews look good:
This combined with associated work split out in the following PRs is useful to explain the nuances:
woohooo! thank you Doug! |
After convo with jerco and per slack convo, clarify in the docs that macro properties aren't support in dbt_project.yml file.
adding a note in the following pages:
note - not sure how semantic models/metrics are added here