Skip to content

Commit 4e63205

Browse files
enabled config for semantic models (#4219)
related to: #3997 related to: #4281 ## What are you changing in this pull request and why? - Add an example for config in `dbt_project.yml` - Match the style for other resource types for `models/semantic_models.yml` - Simplify the definition by removing the explicit listing of applicable resource types - rather than bring it up-to-date by adding sources, metrics, and exposures ## 🎩 ### Previews - [1.6](https://docs-getdbt-com-git-dbeatty-semantic-models-ena-f0b17e-dbt-labs.vercel.app/reference/resource-configs/enabled?version=1.6) - [1.7](https://docs-getdbt-com-git-dbeatty-semantic-models-ena-f0b17e-dbt-labs.vercel.app/reference/resource-configs/enabled?version=1.7) ### v1.7 <img width="500" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/c63a2128-77c6-48ec-b498-76e1e5f6d02b"> ## 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.
2 parents 3f5133c + 3c7a1bd commit 4e63205

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

website/docs/reference/resource-configs/enabled.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,26 @@ Support for disabling semantic models has been added in dbt Core v1.7
261261

262262
<VersionBlock firstVersion="1.7">
263263

264-
<File name='semantic_models.yml'>
265-
266-
```yml
267-
semantic_models:
268-
- name: semantic_people
269-
model: ref('people')
270-
config:
271-
enabled: false
264+
<File name='dbt_project.yml'>
272265

266+
```yaml
267+
semantic-models:
268+
[<resource-path>](/reference/resource-configs/resource-path):
269+
[+](/reference/resource-configs/plus-prefix)enabled: true | false
273270
```
274271
275272
</File>
276273
277-
The `enabled` configuration can be nested under the `config` key.
274+
<File name='models/semantic_models.yml'>
275+
276+
```yaml
277+
semantic_models:
278+
- name: [<semantic_model_name>]
279+
[config](/reference/resource-properties/config):
280+
enabled: true | false
281+
```
282+
283+
</File>
278284
279285
</VersionBlock>
280286
@@ -283,7 +289,7 @@ The `enabled` configuration can be nested under the `config` key.
283289
</Tabs>
284290
285291
## Definition
286-
An optional configuration for disabling models, seeds, snapshots, tests, and semantic models.
292+
An optional configuration for enabling or disabling a resource.
287293
288294
* Default: true
289295

0 commit comments

Comments
 (0)