Skip to content
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

Semantic model configs #4231

Merged
merged 9 commits into from
Oct 11, 2023
32 changes: 31 additions & 1 deletion website/docs/reference/resource-configs/enabled.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ default_value: true
{ label: 'Sources', value: 'sources', },
{ label: 'Metrics', value: 'metrics', },
{ label: 'Exposures', value: 'exposures', },
{ label: 'Semantic models', value: 'semantic models', },
]
}>
<TabItem value="models">
Expand Down Expand Up @@ -250,10 +251,39 @@ exposures:

</TabItem>

<TabItem value="semantic models">

<VersionBlock lastVersion="1.6">

Support for disabling semantic models has been added in dbt Core v1.7

</VersionBlock>

<VersionBlock firstVersion="1.7">

<File name='semantic_models.yml'>

```yml
semantic_models:
- name: semantic_people
model: ref('people')
config:
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
enabled: false

```

</File>

The `enabled` configuration can be nested under the `config` key.

</VersionBlock>

</TabItem>

</Tabs>

## Definition
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
An optional configuration for disabling models, seeds, snapshots, and tests.
An optional configuration for disabling models, seeds, snapshots, tests, and semantic models.

* Default: true

Expand Down
38 changes: 38 additions & 0 deletions website/docs/reference/resource-configs/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This functionality is new in v1.5.
{ label: 'Tests', value: 'tests', },
{ label: 'Analyses', value: 'analyses', },
{ label: 'Metrics', value: 'metrics', },
{ label: 'Semantic models', value: 'semantic models', },
]
}>
<TabItem value="models">
Expand Down Expand Up @@ -265,6 +266,43 @@ metrics:

</TabItem>

<TabItem value="semantic models">

<VersionBlock lastVersion="1.6">

Support for grouping semantic models has been added in dbt Core v1.7.

</VersionBlock>

<VersionBlock firstVersion="1.7">

<File name='schema.yml'>

```yml
semantic_models:
- name: model_name
group: finance

```

</File>

<File name='dbt_project.yml'>

```yml
semantic_models:
[<resource-path>](resource-path):
+group: finance
```

</File>

The `group` configuration can be nested under the `config` key.

</VersionBlock>

</TabItem>

</Tabs>

## Definition
Expand Down
31 changes: 31 additions & 0 deletions website/docs/reference/resource-configs/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ default_value: {}
{ label: 'Tests', value: 'tests', },
{ label: 'Analyses', value: 'analyses', },
{ label: 'Macros', value: 'macros', },
{ label: 'Exposures', value: 'exposures', },
{ label: 'Semantic Models', value: 'semantic models', },
]
}>
<TabItem value="models">
Expand Down Expand Up @@ -172,6 +174,34 @@ exposures:

</TabItem>

<TabItem value="semantic models">
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

<VersionBlock lastVersion="1.6">

Support for grouping semantic models was added in dbt Core v1.7

</VersionBlock>

<VersionBlock firstVersion="1.7">

<File name='semantic_models.yml'>

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

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

</File>

</VersionBlock>

</TabItem>

</Tabs>

## Definition
Expand Down Expand Up @@ -248,3 +278,4 @@ select 1 as id
```

</File>

Loading