dbt-labs / dbt-labs/docs.getdbt.com
Demonstrate and explain `config` `meta` key nesting
- 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
https://docs.getdbt.com/reference/resource-configs/meta
### What part(s) of the page would you like to see updated?
#### 1. Update examples in [`meta`](https://docs.getdbt.com/reference/resource-configs/meta) docs
We want to update all the examples within the [`meta`](https://docs.getdbt.com/reference/resource-configs/meta) docs to nest the `meta` key under the `config` key in the all right places.
#### 2. Update "general configurations" examples for each resource type
Not all of the following pages includes the usage of `meta` underneath the _Project file_, _Property file_ and _Config block_ tabs:
- ✅ [models](https://docs.getdbt.com/reference/model-configs#general-configurations)
- ✅ [seeds](https://docs.getdbt.com/reference/seed-configs#general-configurations)
- ❌ [snapshots](https://docs.getdbt.com/reference/snapshot-configs#general-configurations)
- ❌ [sources](https://docs.getdbt.com/reference/source-configs#general-configurations)
- ✅ [tests](https://docs.getdbt.com/reference/test-configs#general-configurations)
i.e., Both [snapshots](https://docs.getdbt.com/reference/snapshot-configs#general-configurations) and [sources](https://docs.getdbt.com/reference/source-configs#general-configurations) need to have `meta` added to all the relevant tabs, but the rest of the resource types have `meta` included already.
Side note: these resource types don't have config documentation pages, and `meta` may or may not be relevant for each:
- ❌ [analyses](https://docs.getdbt.com/reference/analysis-properties)
- ❌ [exposures](https://docs.getdbt.com/reference/exposure-properties)
- ❌ [macros](https://docs.getdbt.com/reference/macro-properties)
#### 3. Add more explanation
In order for [`meta` dictionaries to merge](https://docs.getdbt.com/reference/configs-and-properties#config-inheritance) with a more specific key-value pair replacing a less specific value with the same key:
- For all* resource types in `_properties.yml` files:
- put `meta` under `config`:
```yaml
config:
meta:
...
```
- Within `dbt_project.yml` don't use `config`:
- use a top-level `meta` key instead.
\* For `models` _only_ - `meta` also works as a top-level key (but better to use consistent syntax across resource types).
### Additional information
For some background, see [here](https://github.com/dbt-labs/dbt-core/issues/7440#issuecomment-1525455253) (and the preceding thread).
See also:
- https://github.com/dbt-labs/dbt-core/issues/9446
- https://github.com/dbt-labs/dbt-core/issues/9447
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the meta documentation page and the general-configurations sections for snapshots and sources, then compare their Project file, Property file, and Config block examples with the models, seeds, and tests pages. Update the relevant examples to show the requested nesting and explain the differing syntax for properties files and dbt_project.yml; done means all listed examples are consistent and the inheritance behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100