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

group config for semantic models #4220

Merged
merged 13 commits into from
Nov 8, 2023
Merged
39 changes: 19 additions & 20 deletions website/docs/reference/resource-configs/group.md
Original file line number Diff line number Diff line change
@@ -29,8 +29,6 @@ Support for grouping models was added in dbt Core v1.5

<VersionBlock firstVersion="1.5">

</VersionBlock>

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

```yml
@@ -68,6 +66,8 @@ select ...

</File>

</VersionBlock>

</TabItem>

<TabItem value="seeds">
@@ -80,8 +80,6 @@ Support for grouping seeds was added in dbt Core v1.5

<VersionBlock firstVersion="1.5">

</VersionBlock>

<File name='dbt_project.yml'>

```yml
@@ -102,6 +100,8 @@ seeds:

</File>

</VersionBlock>


</TabItem>

@@ -115,8 +115,6 @@ Support for grouping snapshots was added in dbt Core v1.5

<VersionBlock firstVersion="1.5">

</VersionBlock>

<File name='dbt_project.yml'>

```yml
@@ -143,6 +141,8 @@ select ...

</File>

</VersionBlock>


</TabItem>

@@ -156,8 +156,6 @@ Support for grouping tests was added in dbt Core v1.5

<VersionBlock firstVersion="1.5">

</VersionBlock>

<File name='dbt_project.yml'>

```yml
@@ -210,6 +208,8 @@ select ...

</File>

</VersionBlock>

</TabItem>

<TabItem value="analyses">
@@ -239,8 +239,6 @@ Support for grouping metrics was added in dbt Core v1.5

<VersionBlock firstVersion="1.5">

</VersionBlock>

<File name='dbt_project.yml'>

```yaml
@@ -264,8 +262,11 @@ metrics:

</File>

</VersionBlock>

</TabItem>


<TabItem value="semantic models">

<VersionBlock lastVersion="1.6">
@@ -276,37 +277,35 @@ Support for grouping semantic models has been added in dbt Core v1.7.

<VersionBlock firstVersion="1.7">

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

```yml
```yaml
semantic_models:
- name: model_name
group: finance
- name: <semantic_model_name>
group: <group_name>

```

</File>

<File name='dbt_project.yml'>

```yml
semantic_models:
```yaml
semantic-models:
[<resource-path>](resource-path):
+group: finance
[+](plus-prefix)group: <group_name>
```

</File>

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

</VersionBlock>

</TabItem>

</Tabs>

## Definition
An optional configuration for grouping models, analysis, snapshots, tests, and metrics. When a resource is grouped, dbt will allow it to reference private models within the same group.
An optional configuration for assigning a group to a resource. When a resource is grouped, dbt will allow it to reference private models within the same group.

For more details on reference access between resources in groups, check out [model access](/docs/collaborate/govern/model-access#groups).