Skip to content

Commit

Permalink
meta config for semantic models (#4218)
Browse files Browse the repository at this point in the history
related to: #4180
related to: #4281

## What are you changing in this pull request and why?
- Mention config in `dbt_project.yml` (like for models, seeds, and
snapshots)
- Match the style for other resource types for
`models/semantic_models.yml`
- Clarify that `meta` is no longer "always" available as a top-level key
(see [#8766](dbt-labs/dbt-core#8766))

## Other

- Here's an open issue to add `meta` config for metrics:
[#3957](#3957)
- Opened an issue to add version blocks for any other resource types for
which it is applicable:
[#4224](#4224)
- Opened an issue to add code examples to [`meta`
](https://docs.getdbt.com/reference/resource-configs/meta) for
`dbt_project.yml` (like
[`enabled`](https://docs.getdbt.com/reference/resource-configs/enabled)
has them):
[#4415](#4415)


## 🎩 

### Previews
-
[1.6](https://docs-getdbt-com-git-dbeatty-semantic-models-met-b30fa1-dbt-labs.vercel.app/reference/resource-configs/meta?version=1.6)
-
[1.7](https://docs-getdbt-com-git-dbeatty-semantic-models-met-b30fa1-dbt-labs.vercel.app/reference/resource-configs/meta?version=1.7)

### v1.7

<img width="500" alt="image"
src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/09de14e0-dd5b-40ef-8d9b-f1cd34a602a9">


## Checklist
- [x] I have tested that the code examples work
- [x] I have tested that the changes look correct in the Vercel preview
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
  • Loading branch information
matthewshaver authored Nov 8, 2023
2 parents 4e63205 + 3336264 commit cfca7c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/docs/reference/resource-configs/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,20 @@ Support for grouping semantic models was added in dbt Core v1.7

<VersionBlock firstVersion="1.7">

<File name='semantic_models.yml'>
<File name='models/semantic_models.yml'>

```yml
semantic_models:
- name: semantic_people
model: ref('people')
- name: semantic_model_name
config:
meta: {<dictionary>}

```
The `meta` configuration can be nusted under the `config` key.

</File>

The `meta` config can also be defined under the `semantic-models` config block in `dbt_project.yml`. See [configs and properties](/reference/configs-and-properties) for details.

</VersionBlock>

</TabItem>
Expand All @@ -207,7 +207,7 @@ The `meta` configuration can be nusted under the `config` key.
## Definition
The `meta` field can be used to set metadata for a resource. This metadata is compiled into the `manifest.json` file generated by dbt, and is viewable in the auto-generated documentation.

Depending on the resource you're configuring, `meta` may be available within the `config` property, or as a top-level key. (For backwards compatibility, `meta` is always supported as a top-level key, though without the capabilities of config inheritance.)
Depending on the resource you're configuring, `meta` may be available within the `config` property, and/or as a top-level key. (For backwards compatibility, `meta` is often (but not always) supported as a top-level key, though without the capabilities of config inheritance.)


## Examples
Expand Down

0 comments on commit cfca7c4

Please sign in to comment.