dbt-labs / dbt-labs/docs.getdbt.com
Global `materialized` config overrides more specific package config
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 130
Description
### Contributions
- [X] I have read the contribution docs, and understand what's expected of me.
### Link to the page on docs.getdbt.com requiring updates
Although it is mentioned in the docs in a few different places, it's still not super obvious to an end user how `models:` within `dbt_project.yml` will behave when there are installed packages:
- https://docs.getdbt.com/reference/model-configs#configuring-models
- https://docs.getdbt.com/reference/model-configs#configuring-directories-of-models-in-dbt_projectyml
- https://docs.getdbt.com/docs/build/packages#configuring-packages
- https://docs.getdbt.com/reference/snapshot-configs#apply-the-target_schema-configuration-to-all-snapshots
https://github.com/dbt-labs/dbt-core/issues/7277 has more context.
### What part(s) of the page would you like to see updated?
### Suggested improvements
1. Review the pages above and determine if they should cross-link to each other or if there is common content to include in multiple pages
1. Use the "callout" formatting where appropriate since some of the behavior is not intuitive
1. Explicitly list the entire order of precedence (below) somewhere
### Order of precedence for (model) configs
The order of precedence for configs is as follows (highest priority first):
1. Configuration within your dbt project:
1. `config()` Jinja macro within a model
2. `config` [resource property](https://docs.getdbt.com/reference/model-properties) in a `.yml` file
3. `dbt_project.yml` file, under the `models:` key -- deepest nested being highest priority
2. Configuration within an installed package (["second verse, same as the first"](https://www.youtube.com/watch?v=GisCRxREDkY&t=20s)):
1. `config()` Jinja macro within a model
2. `config` [resource property](https://docs.getdbt.com/reference/model-properties) in a `.yml` file
3. `dbt_project.yml` file, under the `models:` key -- deepest nested being highest priority
I'm guessing that same precedence applies to some other resources like snapshots, seeds, etc as well, but didn't confirm/deny.
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.