From d91ca4d0292b483c33cda709755366e07e3a4e36 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:32:32 -0400 Subject: [PATCH 1/4] Semantic model configs --- .../reference/resource-configs/enabled.md | 24 ++++++++++++++ .../docs/reference/resource-configs/group.md | 32 +++++++++++++++++++ .../docs/reference/resource-configs/meta.md | 24 ++++++++++++++ 3 files changed, 80 insertions(+) diff --git a/website/docs/reference/resource-configs/enabled.md b/website/docs/reference/resource-configs/enabled.md index b6d0961ee60..40933e5e713 100644 --- a/website/docs/reference/resource-configs/enabled.md +++ b/website/docs/reference/resource-configs/enabled.md @@ -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', }, ] }> @@ -250,6 +251,29 @@ exposures: + + + + +```yml +semantic_models: + - name: semantic_people + model: ref('people') + config: + enabled: false + +``` + + + + + +The `enabled` configuration can be nested under the `config` key. + + + + + ## Definition diff --git a/website/docs/reference/resource-configs/group.md b/website/docs/reference/resource-configs/group.md index dd73d99edff..a3d0e7ce57b 100644 --- a/website/docs/reference/resource-configs/group.md +++ b/website/docs/reference/resource-configs/group.md @@ -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', }, ] }> @@ -265,6 +266,37 @@ metrics: + + + + +```yml +semantic_models: + - name: model_name + group: finance + +``` + + + + + +```yml +semantic_models: + [](resource-path): + +group: finance +``` + + + + + +The `group` configuration can be nested under the `config` key. + + + + + ## Definition diff --git a/website/docs/reference/resource-configs/meta.md b/website/docs/reference/resource-configs/meta.md index d24c5fbaee1..1ffdf15c960 100644 --- a/website/docs/reference/resource-configs/meta.md +++ b/website/docs/reference/resource-configs/meta.md @@ -14,6 +14,7 @@ default_value: {} { label: 'Tests', value: 'tests', }, { label: 'Analyses', value: 'analyses', }, { label: 'Macros', value: 'macros', }, + { label: 'Semantic Models', value: 'semantic models', }, ] }> @@ -172,6 +173,28 @@ exposures: + + + + +```yml +semantic_models: + - name: semantic_people + model: ref('people') + config: + meta: {} + +``` + + +The `meta` configuration can be nested under the `config` key. + + + + + + + ## Definition @@ -248,3 +271,4 @@ select 1 as id ``` + From dfbe7924112db5fe1663207e68379cd5cc19eae7 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:19:06 -0400 Subject: [PATCH 2/4] Moving version blocks --- .../docs/reference/resource-configs/enabled.md | 10 ++++++++-- website/docs/reference/resource-configs/group.md | 10 ++++++++-- website/docs/reference/resource-configs/meta.md | 15 +++++++++++---- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/website/docs/reference/resource-configs/enabled.md b/website/docs/reference/resource-configs/enabled.md index 40933e5e713..8762565a46e 100644 --- a/website/docs/reference/resource-configs/enabled.md +++ b/website/docs/reference/resource-configs/enabled.md @@ -253,6 +253,14 @@ exposures: + + +Support for disabling semantic models has been added in dbt Core v1.7 + + + + + ```yml @@ -266,8 +274,6 @@ semantic_models: - - The `enabled` configuration can be nested under the `config` key. diff --git a/website/docs/reference/resource-configs/group.md b/website/docs/reference/resource-configs/group.md index a3d0e7ce57b..7515d8c5789 100644 --- a/website/docs/reference/resource-configs/group.md +++ b/website/docs/reference/resource-configs/group.md @@ -268,6 +268,14 @@ metrics: + + +Support for grouping semantic models has been added in dbt Core v1.7. + + + + + ```yml @@ -289,8 +297,6 @@ semantic_models: - - The `group` configuration can be nested under the `config` key. diff --git a/website/docs/reference/resource-configs/meta.md b/website/docs/reference/resource-configs/meta.md index 1ffdf15c960..aeff9ee6226 100644 --- a/website/docs/reference/resource-configs/meta.md +++ b/website/docs/reference/resource-configs/meta.md @@ -14,6 +14,7 @@ default_value: {} { label: 'Tests', value: 'tests', }, { label: 'Analyses', value: 'analyses', }, { label: 'Macros', value: 'macros', }, + { label: 'Exposures', value: 'exposures', }, { label: 'Semantic Models', value: 'semantic models', }, ] }> @@ -175,6 +176,14 @@ exposures: + + +Support for grouping semantic models was added in dbt Core v1.7 + + + + + ```yml @@ -185,14 +194,12 @@ semantic_models: meta: {} ``` - +The `meta` configuration can be nusted under the `config` key. -The `meta` configuration can be nested under the `config` key. + - - From 9c1fcea3e3fe097108302f26e49d5e68656dd3d4 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:24:59 -0400 Subject: [PATCH 3/4] Adding semantic models to definition --- website/docs/reference/resource-configs/enabled.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/resource-configs/enabled.md b/website/docs/reference/resource-configs/enabled.md index 8762565a46e..cb9a3cf5fb2 100644 --- a/website/docs/reference/resource-configs/enabled.md +++ b/website/docs/reference/resource-configs/enabled.md @@ -283,7 +283,7 @@ The `enabled` configuration can be nested under the `config` key. ## Definition -An optional configuration for disabling models, seeds, snapshots, and tests. +An optional configuration for disabling models, seeds, snapshots, tests, and semantic models. * Default: true From d7c5cb51a5667bed06cebd707d0f26739839caf2 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 11 Oct 2023 19:09:27 -0400 Subject: [PATCH 4/4] Update website/docs/reference/resource-configs/enabled.md Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com> --- website/docs/reference/resource-configs/enabled.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/resource-configs/enabled.md b/website/docs/reference/resource-configs/enabled.md index cb9a3cf5fb2..52045503088 100644 --- a/website/docs/reference/resource-configs/enabled.md +++ b/website/docs/reference/resource-configs/enabled.md @@ -253,7 +253,7 @@ exposures: - + Support for disabling semantic models has been added in dbt Core v1.7