Skip to content

Commit

Permalink
Semantic model configs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver committed Oct 9, 2023
1 parent 571abfc commit d91ca4d
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
24 changes: 24 additions & 0 deletions 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,6 +251,29 @@ exposures:

</TabItem>

<TabItem value="semantic models">

<File name='semantic_models.yml'>

```yml
semantic_models:
- name: semantic_people
model: ref('people')
config:
enabled: false

```

</File>

<VersionBlock firstVersion="1.7">

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

</VersionBlock>

</TabItem>

</Tabs>

## Definition
Expand Down
32 changes: 32 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,37 @@ metrics:

</TabItem>

<TabItem value="semantic models">

<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>
<VersionBlock firstVersion="1.7">
The `group` configuration can be nested under the `config` key.

</VersionBlock>

</TabItem>

</Tabs>

## Definition
Expand Down
24 changes: 24 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,7 @@ default_value: {}
{ label: 'Tests', value: 'tests', },
{ label: 'Analyses', value: 'analyses', },
{ label: 'Macros', value: 'macros', },
{ label: 'Semantic Models', value: 'semantic models', },
]
}>
<TabItem value="models">
Expand Down Expand Up @@ -172,6 +173,28 @@ exposures:

</TabItem>

<TabItem value="semantic models">

<File name='semantic_models.yml'>

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

```
<VersionBlock firstVersion="1.7">

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

</VersionBlock>

</File>

</TabItem>

</Tabs>

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

</File>

0 comments on commit d91ca4d

Please sign in to comment.