From 0a8b4bff972c67d7c8950f1dd7e19cdc1a97529e Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 30 Aug 2023 13:06:09 +0100 Subject: [PATCH 01/65] clarify macro aren't support in project.yml file --- website/docs/reference/dbt_project.yml.md | 5 +- website/docs/reference/macro-properties.md | 4 +- .../docs/reference/resource-configs/docs.md | 78 ++++++++++++++++--- 3 files changed, 72 insertions(+), 15 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 59541a81256..6009033d557 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -18,12 +18,13 @@ By default, dbt will look for `dbt_project.yml` in your current working director -The following is a list of all available configurations in the `dbt_project.yml` file. - :::info YAML syntax + dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries and strings are represented. ::: +The following is a list of all available configurations in the `dbt_project.yml` file. Something to note, [Macro properties](/reference/macro-properties) aren't supported in the `dbt_project.yml` file: + ```yml diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 91ba52de9ca..3b755cd0107 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -2,9 +2,9 @@ title: Macro properties --- -Macro properties can be declared in `.yml` files. +Macro properties can be declared in `.yml` files, except in the `dbt_project.yml` files. -You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders. +You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in sub-folders. diff --git a/website/docs/reference/resource-configs/docs.md b/website/docs/reference/resource-configs/docs.md index d94b975683d..dff58be8931 100644 --- a/website/docs/reference/resource-configs/docs.md +++ b/website/docs/reference/resource-configs/docs.md @@ -17,10 +17,28 @@ default_value: {show: true} { label: 'Macros', value: 'macros', }, ] }> + +You can use the docs property in YAML files, including the `dbt_project.yml`: + + + +```yml +name: "your_dbt_project_name" +version: "1.0.0" +config-version: 2 + +models: + - name: model_name + docs: + show: true | false +``` + + + ```yml version: 2 @@ -28,7 +46,6 @@ models: - name: model_name docs: show: true | false - ``` @@ -43,6 +60,22 @@ This property is not implemented for sources. +You can use the docs property in YAML files, including the `dbt_project.yml`: + + + +```yml +name: "your_dbt_project_name" +version: "1.0.0" +config-version: 2 + +seeds: + - name: seed_name + docs: + show: true | false +``` + + ```yml @@ -52,15 +85,29 @@ seeds: - name: seed_name docs: show: true | false - ``` - +You can use the docs property in YAML files, including the `dbt_project.yml`: + + + +```yml +name: "your_dbt_project_name" +version: "1.0.0" +config-version: 2 + +snapshots: + - name: snapshot_name + docs: + show: true | false +``` + + ```yml @@ -70,15 +117,29 @@ snapshots: - name: snapshot_name docs: show: true | false - ``` - +You can use the docs property in YAML files, including the `dbt_project.yml`: + + + +```yml +name: "your_dbt_project_name" +version: "1.0.0" +config-version: 2 + +analyses: + - name: analysis_name + docs: + show: true | false +``` + + ```yml @@ -89,16 +150,13 @@ analyses: docs: show: true | false ``` - - +You can use the docs property in YAML files, _except_ in `dbt_project.yml`. [Macro properties](/reference/macro-properties) _are not_ supported in the `dbt_project.yml` file. @@ -109,9 +167,7 @@ macros: - name: macro_name docs: show: true | false - ``` - From cda991a8909f1e68c8b1541ad6bafa39e6695c27 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 31 Aug 2023 17:26:00 +0100 Subject: [PATCH 02/65] add snippet and rephrase --- website/docs/reference/analysis-properties.md | 4 +++- website/docs/reference/configs-and-properties.md | 7 +++++-- website/docs/reference/exposure-properties.md | 6 +++++- website/docs/reference/macro-properties.md | 7 +++++-- website/docs/reference/source-properties.md | 10 +++++++--- website/snippets/_config-prop-callout.md | 1 + 6 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 website/snippets/_config-prop-callout.md diff --git a/website/docs/reference/analysis-properties.md b/website/docs/reference/analysis-properties.md index 008da70f9db..c43819c57b9 100644 --- a/website/docs/reference/analysis-properties.md +++ b/website/docs/reference/analysis-properties.md @@ -2,7 +2,9 @@ title: Analysis properties --- -We recommend you define analysis properties in your `analyses/` directory, which is illustrated in the [`analysis-paths`](/reference/project-configs/analysis-paths) configuration. +import PropsCallout from '/snippets/_config-prop-callout.md'; + +We recommend you define analysis properties in your `analyses/` directory, which is illustrated in the [`analysis-paths`](/reference/project-configs/analysis-paths) configuration.
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `analyses/` or `models/` directory. diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index c2ad5b77629..76297f695ca 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -64,15 +64,18 @@ Previous versions of the docs referred to these as `schema.yml` files — we've ### Which properties are _not_ also configs? -dbt has the ability to define node configs in `.yml` files, in addition to `config()` blocks and `dbt_project.yml`. But the reverse isn't always true: there are some things in `.yml` files that can _only_ be defined there. +In dbt, you can define node configs in `.yml` files, in addition to `config()` blocks and `dbt_project.yml`. However, some properties are exclusive to `.yml` files. + Certain properties are special, because: + - They have a unique Jinja rendering context - They create new project resources - They don't make sense as hierarchical configuration - They're older properties that haven't yet been redefined as configs -These properties are: +This means "configs" can be set for multiple resources at once in the `dbt_project.yml` file, while "properties" can only be set for one resource at a time. The following properties _cannot_ be configured from `dbt_project.yml`: + - [`description`](/reference/resource-properties/description) - [`tests`](/reference/resource-properties/tests) - [`docs`](/reference/resource-configs/docs) diff --git a/website/docs/reference/exposure-properties.md b/website/docs/reference/exposure-properties.md index aaed2a20a09..7a7b9f18790 100644 --- a/website/docs/reference/exposure-properties.md +++ b/website/docs/reference/exposure-properties.md @@ -8,7 +8,11 @@ description: "Read this guide to understand exposure properties in dbt." - [Declaring resource properties](/reference/configs-and-properties) ## Overview -Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define define `sources` or `models`. + +import PropsCallout from '/snippets/_config-prop-callout.md'; + +Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`, except in the `dbt_project.yml` files.
+ You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory. diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 3b755cd0107..2ef2a2fb82e 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -1,10 +1,13 @@ --- title: Macro properties +id: macro-properties --- -Macro properties can be declared in `.yml` files, except in the `dbt_project.yml` files. +import PropsCallout from '/snippets/_config-prop-callout.md'; -You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in sub-folders. +Macro properties can be declared in `.yml` files, except in the `dbt_project.yml` files.
+ + You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in sub-folders: diff --git a/website/docs/reference/source-properties.md b/website/docs/reference/source-properties.md index d20ef5f2877..9388d60a2e9 100644 --- a/website/docs/reference/source-properties.md +++ b/website/docs/reference/source-properties.md @@ -1,5 +1,5 @@ --- -title: "About source properties" +title: "Source properties" description: "Learn how to use source properties in dbt." --- @@ -8,9 +8,13 @@ description: "Learn how to use source properties in dbt." - [Declaring resource properties](/reference/configs-and-properties) ## Overview -Source properties can be declared in `.yml` files in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)). -You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory. +import PropsCallout from '/snippets/_config-prop-callout.md'; + +Source properties can be declared in `.yml` files in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)), except in the `dbt_project.yml` files.
+ + +You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory: diff --git a/website/snippets/_config-prop-callout.md b/website/snippets/_config-prop-callout.md new file mode 100644 index 00000000000..bfb74e1524d --- /dev/null +++ b/website/snippets/_config-prop-callout.md @@ -0,0 +1 @@ +This is because you can set "configs" for many resources in dbt_project.yml, while you can only set "properties" one resource at a time.

Since {props.title} are "properties", this means you cannot configure it from dbt_project.yml
. Refer to Configs and properties for more info. From 66ff1df9d87b7b40f5a339257b854d176db8e772 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 31 Aug 2023 17:28:08 +0100 Subject: [PATCH 03/65] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 6009033d557..73c661a9751 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -4,7 +4,7 @@ -Every [dbt project](/docs/build/projects) needs a `dbt_project.yml` file — this is how dbt knows a directory is a dbt project. It also contains important information that tells dbt how to operate on your project. +Every [dbt project](/docs/build/projects) needs a `dbt_project.yml` file — this is how dbt knows a directory is a dbt project. It also contains important information that tells dbt how to operate your project. @@ -20,10 +20,14 @@ By default, dbt will look for `dbt_project.yml` in your current working director :::info YAML syntax -dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries and strings are represented. +dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries, and strings are represented. ::: -The following is a list of all available configurations in the `dbt_project.yml` file. Something to note, [Macro properties](/reference/macro-properties) aren't supported in the `dbt_project.yml` file: +The following example is a list of all available configurations in the `dbt_project.yml` file. Something to note, the following properties aren't supported in in the `dbt_project.yml` file: + +- [Macro properties](/reference/macro-properties) +- [Analysis properties](/reference/analysis-properties) +- [Semantic model configs](/docs/build/semantic-models) From b163c5bc0576dc69dd967ffb465d86c0926e9b57 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 31 Aug 2023 17:28:48 +0100 Subject: [PATCH 04/65] Update website/docs/reference/macro-properties.md Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/reference/macro-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 3b755cd0107..9e59ca58705 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -4,7 +4,7 @@ title: Macro properties Macro properties can be declared in `.yml` files, except in the `dbt_project.yml` files. -You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in sub-folders. +You can name these files `whatever_you_want.yml` and nest them arbitrarily deep in sub-folders. From ddd2c636dca4bd307fc9a942b248b65aec6ce8bc Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 31 Aug 2023 17:28:55 +0100 Subject: [PATCH 05/65] Update website/docs/reference/macro-properties.md Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/reference/macro-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 9e59ca58705..329a5a94a9f 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -2,7 +2,7 @@ title: Macro properties --- -Macro properties can be declared in `.yml` files, except in the `dbt_project.yml` files. +Macro properties can be declared in any `.yml` file except for the `dbt_project.yml` file. You can name these files `whatever_you_want.yml` and nest them arbitrarily deep in sub-folders. From 6d8ce4eab93834bb1319c0c1ae14bac110037d52 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 31 Aug 2023 17:32:00 +0100 Subject: [PATCH 06/65] update lang --- website/docs/reference/source-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/source-properties.md b/website/docs/reference/source-properties.md index 9388d60a2e9..4dee14d27f4 100644 --- a/website/docs/reference/source-properties.md +++ b/website/docs/reference/source-properties.md @@ -11,7 +11,7 @@ description: "Learn how to use source properties in dbt." import PropsCallout from '/snippets/_config-prop-callout.md'; -Source properties can be declared in `.yml` files in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)), except in the `dbt_project.yml` files.
+Source properties can be declared in any `.yml` file in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)), except for the `dbt_project.yml` file.
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory: From 9a9627afbf3f86094774b3dd93b068c756f7863d Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 6 Sep 2023 12:04:54 +0100 Subject: [PATCH 07/65] tweak snippet and add versionblock --- website/docs/reference/dbt_project.yml.md | 18 ++++++++++++++++++ website/docs/reference/macro-properties.md | 4 +++- website/snippets/_config-prop-callout.md | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 73c661a9751..1e63beae082 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -23,11 +23,29 @@ By default, dbt will look for `dbt_project.yml` in your current working director dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries, and strings are represented. ::: + + + +The following example is a list of all available configurations in the `dbt_project.yml` file. Something to note, the following properties aren't supported in in the `dbt_project.yml` file: + +- [Exposure properties](/reference/exposure-properties) +- [Macro properties](/reference/macro-properties) +- [Analysis properties](/reference/analysis-properties) +- [Source properties](/reference/source-properties) + + + + + The following example is a list of all available configurations in the `dbt_project.yml` file. Something to note, the following properties aren't supported in in the `dbt_project.yml` file: +- [Exposure properties](/reference/exposure-properties) - [Macro properties](/reference/macro-properties) - [Analysis properties](/reference/analysis-properties) - [Semantic model configs](/docs/build/semantic-models) +- [Source properties](/reference/source-properties) + + diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 5fdcea317c8..348eaf6139d 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -3,7 +3,9 @@ title: Macro properties id: macro-properties --- -Macro properties can be declared in any `.yml` file except for the `dbt_project.yml` file.
+import PropsCallout from '/snippets/_config-prop-callout.md'; + +Macro properties can be declared in any `.yml` file, except for the `dbt_project.yml` file. You can name these files `whatever_you_want.yml` and nest them arbitrarily deep in sub-folders. diff --git a/website/snippets/_config-prop-callout.md b/website/snippets/_config-prop-callout.md index bfb74e1524d..a0b7e45a1de 100644 --- a/website/snippets/_config-prop-callout.md +++ b/website/snippets/_config-prop-callout.md @@ -1 +1 @@ -This is because you can set "configs" for many resources in dbt_project.yml, while you can only set "properties" one resource at a time.

Since {props.title} are "properties", this means you cannot configure it from dbt_project.yml
. Refer to Configs and properties for more info. +This is because you can set "configs" for many resources in dbt_project.yml, while you can only set "properties" one resource at a time.

Since {props.title} are "properties", this means you cannot configure it from dbt_project.yml
. Refer to Configs and properties for more info. From a56d9a868b1e3a58e27bccc816d9626ef33127b6 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 6 Sep 2023 12:19:04 +0100 Subject: [PATCH 08/65] remove break --- website/docs/docs/build/semantic-models.md | 16 +++++++++++++++- website/docs/reference/dbt_project.yml.md | 6 ++++-- website/docs/reference/exposure-properties.md | 2 +- website/snippets/_config-prop-callout.md | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/website/docs/docs/build/semantic-models.md b/website/docs/docs/build/semantic-models.md index bb56bd212e6..ca430ae5437 100644 --- a/website/docs/docs/build/semantic-models.md +++ b/website/docs/docs/build/semantic-models.md @@ -8,11 +8,25 @@ sidebar_label: Semantic models tags: [Metrics, Semantic Layer] --- +import PropsCallout from '/snippets/_config-prop-callout.md'; + Semantic models serve as the foundation for defining data in MetricFlow, which powers the dbt Semantic Layer. You can think of semantic models as nodes in your semantic graph, connected via entities as edges. MetricFlow takes semantic models defined in YAML configuration files as inputs and creates a semantic graph that can be used to query metrics. Each semantic model corresponds to a dbt model in your DAG. Therefore you will have one YAML config for each semantic model in your dbt project. You can create multiple semantic models out of a single dbt model, as long as you give each semantic model a unique name. -You can configure semantic models in your dbt project directory in a `YAML` file. Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. + + +You can configure semantic models in your dbt project directory in a `YAML` file, _except_ the `dbt_project.yml` file. Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. + + + + + +You can configure semantic models in your dbt project directory in a `YAML` file, _except_ the `dbt_project.yml` file. + +Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. + + Semantic models have 6 components and this page explains the definitions with some examples: diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 1e63beae082..0a3b76fe0a8 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -26,7 +26,7 @@ dbt uses YAML in a few different places. If you're new to YAML, it would be wort -The following example is a list of all available configurations in the `dbt_project.yml` file. Something to note, the following properties aren't supported in in the `dbt_project.yml` file: +Something to note, the following properties _aren't_ supported in in the `dbt_project.yml` file: - [Exposure properties](/reference/exposure-properties) - [Macro properties](/reference/macro-properties) @@ -37,7 +37,7 @@ The following example is a list of all available configurations in the `dbt_proj -The following example is a list of all available configurations in the `dbt_project.yml` file. Something to note, the following properties aren't supported in in the `dbt_project.yml` file: +Something to note, the following properties _aren't_ supported in in the `dbt_project.yml` file: - [Exposure properties](/reference/exposure-properties) - [Macro properties](/reference/macro-properties) @@ -47,6 +47,8 @@ The following example is a list of all available configurations in the `dbt_proj +The following example is a list of all available configurations in the `dbt_project.yml` file: + ```yml diff --git a/website/docs/reference/exposure-properties.md b/website/docs/reference/exposure-properties.md index 7a7b9f18790..04371d03956 100644 --- a/website/docs/reference/exposure-properties.md +++ b/website/docs/reference/exposure-properties.md @@ -11,7 +11,7 @@ description: "Read this guide to understand exposure properties in dbt." import PropsCallout from '/snippets/_config-prop-callout.md'; -Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`, except in the `dbt_project.yml` files.
+Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`, _except_ in the `dbt_project.yml` file.
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory. diff --git a/website/snippets/_config-prop-callout.md b/website/snippets/_config-prop-callout.md index a0b7e45a1de..ff49a2d297a 100644 --- a/website/snippets/_config-prop-callout.md +++ b/website/snippets/_config-prop-callout.md @@ -1 +1 @@ -This is because you can set "configs" for many resources in dbt_project.yml, while you can only set "properties" one resource at a time.

Since {props.title} are "properties", this means you cannot configure it from dbt_project.yml
. Refer to Configs and properties for more info. +This is because you can set "configs" for many resources in dbt_project.yml, while you can only set "properties" one resource at a time. Since {props.title} are "properties", this means you cannot configure it from dbt_project.yml. Refer to Configs and properties for more info. From 02fb13782f920cdadab5f919022094e92a4a7cba Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Sep 2023 14:18:50 +0100 Subject: [PATCH 09/65] adding jerco's great feedback --- website/docs/docs/build/semantic-models.md | 4 +- .../docs/reference/configs-and-properties.md | 13 ++-- website/docs/reference/dbt_project.yml.md | 24 +------- website/docs/reference/exposure-properties.md | 2 +- website/docs/reference/macro-properties.md | 2 +- .../docs/reference/resource-configs/docs.md | 59 +------------------ website/docs/reference/source-properties.md | 2 +- website/snippets/_config-prop-callout.md | 2 +- 8 files changed, 15 insertions(+), 93 deletions(-) diff --git a/website/docs/docs/build/semantic-models.md b/website/docs/docs/build/semantic-models.md index ca430ae5437..945282d183a 100644 --- a/website/docs/docs/build/semantic-models.md +++ b/website/docs/docs/build/semantic-models.md @@ -16,13 +16,13 @@ Each semantic model corresponds to a dbt model in your DAG. Therefore you will h -You can configure semantic models in your dbt project directory in a `YAML` file, _except_ the `dbt_project.yml` file. Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. +You can configure semantic models in your dbt project directory in a [`properties.yml` file](/reference/configs-and-properties#where-can-i-define-properties). Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. -You can configure semantic models in your dbt project directory in a `YAML` file, _except_ the `dbt_project.yml` file. +You can configure semantic models in your dbt project directory in a [`.yml` file](/reference/configs-and-properties#where-can-i-define-properties), however, you cannot actually define their properties within the `dbt_project.yml` file. Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index 76297f695ca..2a483296381 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -3,7 +3,7 @@ title: Configs, properties, what are they? --- Resources in your project—models, snapshots, seeds, tests, and the rest—can have a number of declared **properties**. Resources can also define **configurations**, which are a special kind of property that bring extra abilities. What's the distinction? -- Properties are declared for resources one-by-one in `.yml` files. Configs can be defined there, nested under a `config` property. They can also be set one-by-one via a `config()` macro (right within `.sql` files), and for many resources at once in `dbt_project.yml`. +- Properties are declared for resources one-by-one in `properties.yml` files. Configs can be defined there, nested under a `config` property. They can also be set one-by-one via a `config()` macro (right within `.sql` files), and for many resources at once in `dbt_project.yml`. - Because configs can be set in multiple places, they are also applied hierarchically. An individual resource might _inherit_ or _override_ configs set elsewhere. - You can select resources based on their config values using the `config:` selection method, but not the values of non-config properties @@ -46,9 +46,7 @@ Most configurations are "clobbered" when applied hierarchically. Whenever a more ## Where can I define properties? -In dbt, properties are declared in `.yml` files, in the same directory as your resources. - -You can name these files `whatever_you_want.yml` and nest them arbitrarily deeply in subfolders within each directory. +In dbt, you can use `properties.yml` files to define properties for resources. You can declare properties in `.yml` files, in the same directory as your resources. You can name these files `whatever_you_want.yml` and nest them arbitrarily in sub-folders within each directory. We highly recommend that you define properties in dedicated paths alongside the resources they're describing. @@ -56,16 +54,15 @@ We highly recommend that you define properties in dedicated paths alongside the #### schema.yml files -Previous versions of the docs referred to these as `schema.yml` files — we've moved away from that terminology since the word `schema` is used to mean other things when talking about databases, and people often thought that you _had_ to name these files `schema.yml`. +Previous versions of the docs referred to these as `schema.yml` files — we've moved away from that terminology since the word `schema` is used to mean other things when talking about databases, and people often thought that you _had_ to name these files `schema.yml`. -(Of course, you're still free to name your files `schema.yml`) +Instead, we now refer to these files as `properties.yml` files. (Of course, you're still free to name your files `schema.yml`) ::: ### Which properties are _not_ also configs? -In dbt, you can define node configs in `.yml` files, in addition to `config()` blocks and `dbt_project.yml`. However, some properties are exclusive to `.yml` files. - +In dbt, you can define node configs in `properties.yml` files, in addition to `config()` blocks and `dbt_project.yml`. However, some properties are exclusive to `.yml` files. Certain properties are special, because: diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 0a3b76fe0a8..5a195dd6662 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -23,29 +23,7 @@ By default, dbt will look for `dbt_project.yml` in your current working director dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries, and strings are represented. ::: - - - -Something to note, the following properties _aren't_ supported in in the `dbt_project.yml` file: - -- [Exposure properties](/reference/exposure-properties) -- [Macro properties](/reference/macro-properties) -- [Analysis properties](/reference/analysis-properties) -- [Source properties](/reference/source-properties) - - - - - -Something to note, the following properties _aren't_ supported in in the `dbt_project.yml` file: - -- [Exposure properties](/reference/exposure-properties) -- [Macro properties](/reference/macro-properties) -- [Analysis properties](/reference/analysis-properties) -- [Semantic model configs](/docs/build/semantic-models) -- [Source properties](/reference/source-properties) - - +Something to note, you can't set up a "property" in the `dbt_project.yml` file if it's not a config (an example is [macros](/reference/macro-properties)). This applies to all types of resources. Refer to [Configs and properties](/reference/configs-and-properties) for more detail. The following example is a list of all available configurations in the `dbt_project.yml` file: diff --git a/website/docs/reference/exposure-properties.md b/website/docs/reference/exposure-properties.md index 04371d03956..ffc494f6025 100644 --- a/website/docs/reference/exposure-properties.md +++ b/website/docs/reference/exposure-properties.md @@ -11,7 +11,7 @@ description: "Read this guide to understand exposure properties in dbt." import PropsCallout from '/snippets/_config-prop-callout.md'; -Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`, _except_ in the `dbt_project.yml` file.
+Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`.
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory. diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 348eaf6139d..685643a9aaa 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -5,7 +5,7 @@ id: macro-properties import PropsCallout from '/snippets/_config-prop-callout.md'; -Macro properties can be declared in any `.yml` file, except for the `dbt_project.yml` file. +Macro properties can be declared in any `.yml` file. You can name these files `whatever_you_want.yml` and nest them arbitrarily deep in sub-folders. diff --git a/website/docs/reference/resource-configs/docs.md b/website/docs/reference/resource-configs/docs.md index dff58be8931..a6e0f4dc9b0 100644 --- a/website/docs/reference/resource-configs/docs.md +++ b/website/docs/reference/resource-configs/docs.md @@ -20,21 +20,8 @@ default_value: {show: true} -You can use the docs property in YAML files, including the `dbt_project.yml`: - - +You can configure `docs` behavior for many resources at once by setting in `dbt_project.yml`. You can also use the `docs` config in `properties.yaml` files, to set or override documentation behaviors for specific resources: -```yml -name: "your_dbt_project_name" -version: "1.0.0" -config-version: 2 - -models: - - name: model_name - docs: - show: true | false -``` - @@ -62,19 +49,6 @@ This property is not implemented for sources. You can use the docs property in YAML files, including the `dbt_project.yml`: - - -```yml -name: "your_dbt_project_name" -version: "1.0.0" -config-version: 2 - -seeds: - - name: seed_name - docs: - show: true | false -``` - @@ -94,20 +68,6 @@ seeds: You can use the docs property in YAML files, including the `dbt_project.yml`: - - -```yml -name: "your_dbt_project_name" -version: "1.0.0" -config-version: 2 - -snapshots: - - name: snapshot_name - docs: - show: true | false -``` - - ```yml @@ -124,21 +84,8 @@ snapshots: -You can use the docs property in YAML files, including the `dbt_project.yml`: +You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Analysis properties](/reference/analysis-properties) for more info. - - -```yml -name: "your_dbt_project_name" -version: "1.0.0" -config-version: 2 - -analyses: - - name: analysis_name - docs: - show: true | false -``` - @@ -156,7 +103,7 @@ analyses: -You can use the docs property in YAML files, _except_ in `dbt_project.yml`. [Macro properties](/reference/macro-properties) _are not_ supported in the `dbt_project.yml` file. +You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Macro properties](/reference/macro-properties) for more info. diff --git a/website/docs/reference/source-properties.md b/website/docs/reference/source-properties.md index 4dee14d27f4..ead76040b05 100644 --- a/website/docs/reference/source-properties.md +++ b/website/docs/reference/source-properties.md @@ -11,7 +11,7 @@ description: "Learn how to use source properties in dbt." import PropsCallout from '/snippets/_config-prop-callout.md'; -Source properties can be declared in any `.yml` file in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)), except for the `dbt_project.yml` file.
+Source properties can be declared in any `.yml` file in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)).
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory: diff --git a/website/snippets/_config-prop-callout.md b/website/snippets/_config-prop-callout.md index ff49a2d297a..f21c335734a 100644 --- a/website/snippets/_config-prop-callout.md +++ b/website/snippets/_config-prop-callout.md @@ -1 +1 @@ -This is because you can set "configs" for many resources in dbt_project.yml, while you can only set "properties" one resource at a time. Since {props.title} are "properties", this means you cannot configure it from dbt_project.yml. Refer to Configs and properties for more info. +{props.title} are "special properties" in that you can't configure them in the dbt_project.yml file or using config() blocks. Refer to Configs and properties for more info. From 1872ce1d2f4edc719efb748cdc1684ad26f714d2 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Sep 2023 14:32:21 +0100 Subject: [PATCH 10/65] clarify --- website/docs/reference/configs-and-properties.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index 2a483296381..61e401f016d 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -62,7 +62,7 @@ Instead, we now refer to these files as `properties.yml` files. (Of course, you' ### Which properties are _not_ also configs? -In dbt, you can define node configs in `properties.yml` files, in addition to `config()` blocks and `dbt_project.yml`. However, some properties are exclusive to `.yml` files. +In dbt, you can define node configs in `properties.yml` files, in addition to `config()` blocks and `dbt_project.yml`. However, some special properties can only be defined in the `.yml` file and you cannot configure them using `config()` blocks or the `dbt_project.yml` file: Certain properties are special, because: @@ -71,7 +71,7 @@ Certain properties are special, because: - They don't make sense as hierarchical configuration - They're older properties that haven't yet been redefined as configs -This means "configs" can be set for multiple resources at once in the `dbt_project.yml` file, while "properties" can only be set for one resource at a time. The following properties _cannot_ be configured from `dbt_project.yml`: +These properties are: - [`description`](/reference/resource-properties/description) - [`tests`](/reference/resource-properties/tests) From 56fbe0ae0dd3c62839c4bd23865beb26a57a8390 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Sep 2023 14:38:53 +0100 Subject: [PATCH 11/65] change yaml to `properties.yml` --- website/docs/docs/build/semantic-models.md | 2 +- website/docs/reference/exposure-properties.md | 2 +- website/docs/reference/macro-properties.md | 2 +- website/docs/reference/source-properties.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/docs/build/semantic-models.md b/website/docs/docs/build/semantic-models.md index 945282d183a..af4dff406c5 100644 --- a/website/docs/docs/build/semantic-models.md +++ b/website/docs/docs/build/semantic-models.md @@ -22,7 +22,7 @@ You can configure semantic models in your dbt project directory in a [`propertie -You can configure semantic models in your dbt project directory in a [`.yml` file](/reference/configs-and-properties#where-can-i-define-properties), however, you cannot actually define their properties within the `dbt_project.yml` file. +You can configure semantic models in your dbt project directory in a [`properties.yml` file](/reference/configs-and-properties#where-can-i-define-properties), however, you cannot actually define their properties within the `dbt_project.yml` file. Depending on your project structure, you can nest semantic models under a `metrics:` folder or organize them under project sources. diff --git a/website/docs/reference/exposure-properties.md b/website/docs/reference/exposure-properties.md index ffc494f6025..0bd4cf771af 100644 --- a/website/docs/reference/exposure-properties.md +++ b/website/docs/reference/exposure-properties.md @@ -11,7 +11,7 @@ description: "Read this guide to understand exposure properties in dbt." import PropsCallout from '/snippets/_config-prop-callout.md'; -Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`.
+Exposures are defined in `properties.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`.
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory. diff --git a/website/docs/reference/macro-properties.md b/website/docs/reference/macro-properties.md index 685643a9aaa..cd9ca559bac 100644 --- a/website/docs/reference/macro-properties.md +++ b/website/docs/reference/macro-properties.md @@ -5,7 +5,7 @@ id: macro-properties import PropsCallout from '/snippets/_config-prop-callout.md'; -Macro properties can be declared in any `.yml` file. +Macro properties can be declared in any `properties.yml` file. You can name these files `whatever_you_want.yml` and nest them arbitrarily deep in sub-folders. diff --git a/website/docs/reference/source-properties.md b/website/docs/reference/source-properties.md index ead76040b05..d107881967e 100644 --- a/website/docs/reference/source-properties.md +++ b/website/docs/reference/source-properties.md @@ -11,7 +11,7 @@ description: "Learn how to use source properties in dbt." import PropsCallout from '/snippets/_config-prop-callout.md'; -Source properties can be declared in any `.yml` file in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)).
+Source properties can be declared in any `properties.yml` file in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)).
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory: From 5ec1c05b15bea8e52181681f7c9b1882eec25181 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 7 Nov 2023 11:27:41 +0000 Subject: [PATCH 12/65] add table --- .../docs/reference/configs-and-properties.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index 61e401f016d..c427a87e795 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -11,7 +11,7 @@ A rule of thumb: properties declare things _about_ your project resources; confi For example, you can use resource **properties** to: * Describe models, snapshots, seed files, and their columns -- Assert "truths" about a model, in the form of [tests](/docs/build/tests), e.g. "this `id` column is unique" +* Assert "truths" about a model, in the form of [tests](/docs/build/tests), e.g. "this `id` column is unique" * Define pointers to existing tables that contain raw data, in the form of [sources](/docs/build/sources), and assert the expected "freshness" of this raw data * Define official downstream uses of your data models, in the form of [exposures](/docs/build/exposures) @@ -21,6 +21,21 @@ Whereas you can use **configurations** to: * Declare whether a resource should persist its descriptions as comments in the database * Apply tags and "meta" properties +### Resource, properties, and configs table + +| Resource type | Description | Supported properties | Supported configurations | Config inheritance | +|---------------|------------------|-----------------------|-----------------------------|----------------------| +| Models | Describes models and their columns | columns, tests, docs, macros | tags, materialized, persist_docs, tags, etc. | `properties.yml` -> `.yml file` -> `dbt_project.yml` | +| Snapshots | Periodic snapshots of data | tests, macros | tags, materialized, etc. | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | +| Seeds | Uploaded source data for models | tests, macros | tags, persist_docs, etc. | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | +| Tests | Asserts "truths" about models | description, tags, macros | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | +| Sources | Pointers to tables with raw data | description, columns, tests, docs, macros | tags, persist_docs, etc. | `properties.yml` -> `.yml file` -> `dbt_project.yml` | +| Exposures | Official downstream uses of data models | description, columns, tests, docs, macros | tags, materialized, etc. | `properties.yml` -> `.yml file` -> `dbt_project.yml` | +| | | | | | +| Configurations| Extra abilities for resources | | | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | +| | | | | | +| Special properties (not configs)| Special properties with unique rendering context | description, tests, docs, columns, quote, source properties, exposure properties, macro properties | | `properties.yml` | + ## Where can I define configs? Depending on the resource type, configurations can be defined: @@ -202,3 +217,4 @@ Runtime Error ``` This error occurred because a semicolon (`;`) was accidentally used instead of a colon (`:`) after the `description` field. To resolve issues like this, find the `.yml` file referenced in the error message and fix any syntax errors present in the file. There are online YAML validators that can be helpful here, but please be mindful of submitting sensitive information to third-party applications! + From ef8c3bc39c8303032571d5c4794980a7921a2579 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:51:17 +0000 Subject: [PATCH 13/65] Update configs-and-properties.md --- .../docs/reference/configs-and-properties.md | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index c427a87e795..9a45d2bd220 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -21,21 +21,6 @@ Whereas you can use **configurations** to: * Declare whether a resource should persist its descriptions as comments in the database * Apply tags and "meta" properties -### Resource, properties, and configs table - -| Resource type | Description | Supported properties | Supported configurations | Config inheritance | -|---------------|------------------|-----------------------|-----------------------------|----------------------| -| Models | Describes models and their columns | columns, tests, docs, macros | tags, materialized, persist_docs, tags, etc. | `properties.yml` -> `.yml file` -> `dbt_project.yml` | -| Snapshots | Periodic snapshots of data | tests, macros | tags, materialized, etc. | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | -| Seeds | Uploaded source data for models | tests, macros | tags, persist_docs, etc. | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | -| Tests | Asserts "truths" about models | description, tags, macros | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | -| Sources | Pointers to tables with raw data | description, columns, tests, docs, macros | tags, persist_docs, etc. | `properties.yml` -> `.yml file` -> `dbt_project.yml` | -| Exposures | Official downstream uses of data models | description, columns, tests, docs, macros | tags, materialized, etc. | `properties.yml` -> `.yml file` -> `dbt_project.yml` | -| | | | | | -| Configurations| Extra abilities for resources | | | In-file `config()` block -> `.yml file` -> `dbt_project.yml` | -| | | | | | -| Special properties (not configs)| Special properties with unique rendering context | description, tests, docs, columns, quote, source properties, exposure properties, macro properties | | `properties.yml` | - ## Where can I define configs? Depending on the resource type, configurations can be defined: @@ -50,11 +35,11 @@ dbt prioritizes configurations in order of specificity, from most specificity to Note - Generic tests work a little differently when it comes to specificity. See [test configs](/reference/test-configs). -Within the project file, configurations are also applied hierarchically. The most-specific config always "wins": In the project file, configurations applied to a `marketing` subdirectory will take precedence over configurations applied to the entire `jaffle_shop` project. To apply a configuration to a model, or directory of models, define the resource path as nested dictionary keys. +Within the project file, configurations are also applied hierarchically. The most specific config always "wins": In the project file, configurations applied to a `marketing` subdirectory will take precedence over configurations applied to the entire `jaffle_shop` project. To apply a configuration to a model, or directory of models, define the resource path as nested dictionary keys. ### Combining configs -Most configurations are "clobbered" when applied hierarchically. Whenever a more-specific value is available, it will completely replace the less-specific value. Note that a few configs have different merge behavior: +Most configurations are "clobbered" when applied hierarchically. Whenever a more specific value is available, it will completely replace the less specific value. Note that a few configs have different merge behavior: - [`tags`](tags) are additive. If a model has some tags configured in `dbt_project.yml`, and more tags applied in its `.sql` file, the final set of tags will include all of them. - [`meta`](/reference/resource-configs/meta) dictionaries are merged (a more specific key-value pair replaces a less specific value with the same key) - [`pre-hook` and `post-hook`](/reference/resource-configs/pre-hook-post-hook) are also additive. From 02a3cae7ca77942a2f40027cce16c25fabc36443 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 10 Nov 2023 08:40:11 -0700 Subject: [PATCH 14/65] Remove trailing space --- website/docs/reference/configs-and-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index 9a45d2bd220..4fb9dda5aa2 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -54,7 +54,7 @@ We highly recommend that you define properties in dedicated paths alongside the #### schema.yml files -Previous versions of the docs referred to these as `schema.yml` files — we've moved away from that terminology since the word `schema` is used to mean other things when talking about databases, and people often thought that you _had_ to name these files `schema.yml`. +Previous versions of the docs referred to these as `schema.yml` files — we've moved away from that terminology since the word `schema` is used to mean other things when talking about databases, and people often thought that you _had_ to name these files `schema.yml`. Instead, we now refer to these files as `properties.yml` files. (Of course, you're still free to name your files `schema.yml`) From e68dafa9cf383f405b694dd2cb639058878c5003 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:38:42 -0500 Subject: [PATCH 15/65] Updating deps command page --- website/docs/reference/commands/deps.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/commands/deps.md b/website/docs/reference/commands/deps.md index 60ccd091ad7..1a9314987d9 100644 --- a/website/docs/reference/commands/deps.md +++ b/website/docs/reference/commands/deps.md @@ -62,7 +62,9 @@ Update your versions in packages.yml, then run dbt deps dbt generates the `package-lock.yml` file in the _project_root_ where `packages.yml` is recorded, which contains all the resolved packages, the first time you run `dbt deps`. Each subsequent run records the packages installed in this file. If the subsequent `dbt deps` runs contain no updated packages in `dependencies.yml` or `packages.yml`, dbt-core installs from `package-lock.yml`. -When you update the package spec and run `dbt deps` again, the package-lock and package files update accordingly. You can run `dbt deps --lock` to update the `package-lock.yml` with the most recent dependencies from `packages`. +When you update the package spec and run `dbt deps` again, the `package-lock.yml` and `packages.yml` files update accordingly. There are two flags for the `package-lock.yml`: +- `dbt deps --upgrade` — creates or updates the `package-lock.yml` with the most recent dependencies from `packages.yml` and installs them. +- `dbt deps --lock` — creates or updates the `package-lock.yml` but does not install the packages. The `--add-package` flag allows you to add a package to the `packages.yml` with configurable `--version` and `--source` information. The `--dry-run` flag, when set to `False`(default), recompiles the `package-lock.yml` file after a new package is added to the `packages.yml` file. Set the flag to `True` for the changes to not persist. From 3c3d28c543b1dc91d5f0e874471927c27724472b Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:43:27 -0500 Subject: [PATCH 16/65] updating spacing --- website/docs/reference/commands/deps.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/commands/deps.md b/website/docs/reference/commands/deps.md index 1a9314987d9..ddd3e4acb8e 100644 --- a/website/docs/reference/commands/deps.md +++ b/website/docs/reference/commands/deps.md @@ -62,7 +62,9 @@ Update your versions in packages.yml, then run dbt deps dbt generates the `package-lock.yml` file in the _project_root_ where `packages.yml` is recorded, which contains all the resolved packages, the first time you run `dbt deps`. Each subsequent run records the packages installed in this file. If the subsequent `dbt deps` runs contain no updated packages in `dependencies.yml` or `packages.yml`, dbt-core installs from `package-lock.yml`. -When you update the package spec and run `dbt deps` again, the `package-lock.yml` and `packages.yml` files update accordingly. There are two flags for the `package-lock.yml`: +When you update the package spec and run `dbt deps` again, the `package-lock.yml` and `packages.yml` files update accordingly. + +There are two flags related to `package-lock.yml`: - `dbt deps --upgrade` — creates or updates the `package-lock.yml` with the most recent dependencies from `packages.yml` and installs them. - `dbt deps --lock` — creates or updates the `package-lock.yml` but does not install the packages. From cfd3f8492606ac25cbaa5cf55287092f651886f0 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:44:20 -0500 Subject: [PATCH 17/65] Apply suggestions from code review --- website/docs/reference/commands/deps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/commands/deps.md b/website/docs/reference/commands/deps.md index ddd3e4acb8e..40d9ee1cabd 100644 --- a/website/docs/reference/commands/deps.md +++ b/website/docs/reference/commands/deps.md @@ -65,8 +65,8 @@ dbt generates the `package-lock.yml` file in the _project_root_ where `packages. When you update the package spec and run `dbt deps` again, the `package-lock.yml` and `packages.yml` files update accordingly. There are two flags related to `package-lock.yml`: -- `dbt deps --upgrade` — creates or updates the `package-lock.yml` with the most recent dependencies from `packages.yml` and installs them. -- `dbt deps --lock` — creates or updates the `package-lock.yml` but does not install the packages. +- `dbt deps --upgrade` — creates or updates the `package-lock.yml` file with the most recent dependencies from `packages.yml` and installs them. +- `dbt deps --lock` — creates or updates the `package-lock.yml` file but does not install the packages. The `--add-package` flag allows you to add a package to the `packages.yml` with configurable `--version` and `--source` information. The `--dry-run` flag, when set to `False`(default), recompiles the `package-lock.yml` file after a new package is added to the `packages.yml` file. Set the flag to `True` for the changes to not persist. From a1a8e7ff1f278c916aee2efd92bff6ae2b2750a2 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 22 Nov 2023 07:26:03 -0500 Subject: [PATCH 18/65] Update docs.md --- website/docs/reference/resource-configs/docs.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/website/docs/reference/resource-configs/docs.md b/website/docs/reference/resource-configs/docs.md index 12f95f8958e..c5e35dd64f4 100644 --- a/website/docs/reference/resource-configs/docs.md +++ b/website/docs/reference/resource-configs/docs.md @@ -20,9 +20,6 @@ default_value: {show: true} -You can configure `docs` behavior for many resources at once by setting in `dbt_project.yml`. You can also use the `docs` config in `properties.yaml` files, to set or override documentation behaviors for specific resources: - - @@ -48,9 +45,6 @@ This property is not implemented for sources. -You can use the docs property in YAML files, including the `dbt_project.yml`: - - ```yml @@ -67,8 +61,6 @@ seeds: -You can use the docs property in YAML files, including the `dbt_project.yml`: - ```yml @@ -85,9 +77,6 @@ snapshots: -You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Analysis properties](/reference/analysis-properties) for more info. - - ```yml @@ -104,7 +93,9 @@ analyses: -You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Macro properties](/reference/macro-properties) for more info. + From 993f4446b115232d574eb802cd050ec145ea3412 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Thu, 7 Dec 2023 13:45:00 -0500 Subject: [PATCH 19/65] break out configuration change monitoring from materialized views --- website/docs/docs/build/materializations.md | 47 +++++----- .../on_configuration_change.md | 86 +++++++++++++++++++ 2 files changed, 111 insertions(+), 22 deletions(-) create mode 100644 website/docs/reference/resource-configs/on_configuration_change.md diff --git a/website/docs/docs/build/materializations.md b/website/docs/docs/build/materializations.md index 192284a31ca..67796afdbdb 100644 --- a/website/docs/docs/build/materializations.md +++ b/website/docs/docs/build/materializations.md @@ -109,27 +109,7 @@ When using the `table` materialization, your model is rebuilt as a + + + + + + +```yaml +models: + [](/reference/resource-configs/resource-path): + [+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): + [+](/reference/resource-configs/plus-prefix)on_configuration_change: apply | continue | fail +``` + + + + + + + + + + +```yaml +version: 2 + +models: + - name: [] + config: + [materialized](/reference/resource-configs/materialized): + on_configuration_change: apply | continue | fail +``` + + + + + + + + + + +```jinja +{{ config( + [materialized](/reference/resource-configs/materialized)="", + on_configuration_change="apply" | "continue" | "fail" +) }} +``` + + + + + + + +Materializations are implemented following this "drop through" life cycle: +1. If a model does not exist with the provided path, create the new model +2. If a model exists, but has a different type, drop the existing model and create the new model +3. If `--full-refresh` is supplied, replace the existing model regardless of configuration changes and the `on_configuration_change` setting +4. If there are no configuration changes, perform the default action for that type (e.g. apply refresh for a materialized view) +5. Determine whether to apply the configuration changes according to the `on_configuration_change` setting From 8e7c519dfdf5696d2705e6a694e0c65900f16b3b Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Thu, 7 Dec 2023 13:49:05 -0500 Subject: [PATCH 20/65] add the new page to website/sidebars.js --- website/sidebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/website/sidebars.js b/website/sidebars.js index 598fffc7f0d..2c2b1876c16 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -776,6 +776,7 @@ const sidebarSettings = { "reference/model-properties", "reference/model-configs", "reference/resource-configs/materialized", + "reference/resource-configs/on_configuration_change", "reference/resource-configs/sql_header", ], }, From 3ef39fbf6234a2de2c1d043db55611bea0352004 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:12:43 -0500 Subject: [PATCH 21/65] Update website/docs/reference/commands/deps.md Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> --- website/docs/reference/commands/deps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/commands/deps.md b/website/docs/reference/commands/deps.md index 40d9ee1cabd..1a3562e3172 100644 --- a/website/docs/reference/commands/deps.md +++ b/website/docs/reference/commands/deps.md @@ -65,8 +65,8 @@ dbt generates the `package-lock.yml` file in the _project_root_ where `packages. When you update the package spec and run `dbt deps` again, the `package-lock.yml` and `packages.yml` files update accordingly. There are two flags related to `package-lock.yml`: -- `dbt deps --upgrade` — creates or updates the `package-lock.yml` file with the most recent dependencies from `packages.yml` and installs them. -- `dbt deps --lock` — creates or updates the `package-lock.yml` file but does not install the packages. +- `dbt deps --lock` — creates or updates the `package-lock.yml` file but does not install the packages. +- `dbt deps --upgrade` — creates or updates the `package-lock.yml` file with the most recent dependencies from `packages.yml`. Also install the packages unless the `--lock` flag is also passed. The `--add-package` flag allows you to add a package to the `packages.yml` with configurable `--version` and `--source` information. The `--dry-run` flag, when set to `False`(default), recompiles the `package-lock.yml` file after a new package is added to the `packages.yml` file. Set the flag to `True` for the changes to not persist. From d9d5ecef8f5f10a867deea88e8f9eae3144c862b Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 12 Dec 2023 10:16:20 -0500 Subject: [PATCH 22/65] new file --- .../dbt-cloud-tips.md => build/dbt-tips.md} | 30 +++---------- .../docs/cloud/about-cloud/about-cloud-ide.md | 2 +- .../dbt-cloud-ide/develop-in-the-cloud.md | 6 +-- .../cloud/dbt-cloud-ide/ide-user-interface.md | 2 +- .../cloud/dbt-cloud-ide/keyboard-shortcuts.md | 43 +++++++++++++++++++ .../docs/cloud/dbt-cloud-ide/lint-format.md | 2 +- website/sidebars.js | 3 +- website/vercel.json | 5 +++ 8 files changed, 61 insertions(+), 32 deletions(-) rename website/docs/docs/{cloud/dbt-cloud-ide/dbt-cloud-tips.md => build/dbt-tips.md} (71%) create mode 100644 website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md diff --git a/website/docs/docs/cloud/dbt-cloud-ide/dbt-cloud-tips.md b/website/docs/docs/build/dbt-tips.md similarity index 71% rename from website/docs/docs/cloud/dbt-cloud-ide/dbt-cloud-tips.md rename to website/docs/docs/build/dbt-tips.md index 0ceb4929530..50a31c127e6 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/dbt-cloud-tips.md +++ b/website/docs/docs/build/dbt-tips.md @@ -1,31 +1,11 @@ --- -title: "Tips and tricks" -id: dbt-cloud-tips -description: "Check out any dbt Cloud and IDE-related tips." -sidebar_label: "Tips and tricks" +title: "dbt tips and tricks" +description: "Check out any dbt-related tips and tricks to help you work faster and be more productive." +sidebar_label: "dbt tips and tricks" pagination_next: null --- -# dbt Cloud tips - -The Cloud IDE provides keyboard shortcuts, features, and development tips to help you work faster and be more productive. Use this Cloud IDE cheat sheet to help you quickly reference some common operations. - -## Cloud IDE Keyboard shortcuts - -There are default keyboard shortcuts that can help make development more productive and easier for everyone. - -- Press Fn-F1 to view a full list of the editor shortcuts -- Command-O on macOS or Control-O on Windows to select a file to open -- Command-P/Command-Shift-P on macOS or Control-P/Control-Shift-P on Windows to see the command palette -- Hold Option-click-on-area or press Shift-Option-Command on macOS or Hold-Alt-click-on-area on Windows to select multiple lines and perform a multi-edit. You can also press Command-E to perform this operation on the command line. -- Command-Enter on macOS or Control-Enter on Windows to Preview your code -- Command-Shift-Enter on macOS or Control-Shift-Enter on Windows to Compile -- Highlight a portion of code and use the above shortcuts to Preview or Compile code -- Enter two underscores (__) in the IDE to reveal a list of dbt functions -- Press Control-backtick (or Ctrl + `) to toggle the Invocation history -- Press Command-Option-forward slash on macOS or Control-Alt-forward slash on Windows on the selected code to add a block comment. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`. Markdown files will use the Markdown syntax `()` -- Option-W on macOS or Alt-W on Windows will close the currently active editor tab - +Use this page to learn about any dbt-related tips and tricks to help you work faster and be more productive. You can also learn about the default dbt Cloud IDE keyboard shortcuts to help make development more productive and easier for everyone. ## Package tips @@ -61,4 +41,4 @@ There are default keyboard shortcuts that can help make development more product - [Quickstart guide](/guides) - [About dbt Cloud](/docs/cloud/about-cloud/dbt-cloud-features) -- [Develop in the Cloud](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud) +- [Develop in the Cloud](/docs/cloud/about-develop-dbt) diff --git a/website/docs/docs/cloud/about-cloud/about-cloud-ide.md b/website/docs/docs/cloud/about-cloud/about-cloud-ide.md index 7643928feec..df5575ecb8f 100644 --- a/website/docs/docs/cloud/about-cloud/about-cloud-ide.md +++ b/website/docs/docs/cloud/about-cloud/about-cloud-ide.md @@ -28,4 +28,4 @@ For more information, read the complete [Cloud IDE guide](/docs/cloud/dbt-cloud- ## Related docs - [IDE user interface](/docs/cloud/dbt-cloud-ide/ide-user-interface) -- [Tips and tricks](/docs/cloud/dbt-cloud-ide/dbt-cloud-tips) +- [Keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md index 9fc382f0217..30f5e1463a1 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md @@ -10,7 +10,7 @@ pagination_prev: null The dbt Cloud integrated development environment (IDE) is a single web-based interface for building, testing, running, and version-controlling dbt projects. It compiles dbt code into SQL and executes it directly on your database. -The dbt Cloud IDE offers several [editing features](/docs/cloud/dbt-cloud-ide/ide-user-interface#editing-features) for faster and more efficient data platform development and governance: +The dbt Cloud IDE offers several [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) and [editing features](/docs/cloud/dbt-cloud-ide/ide-user-interface#editing-features) for faster and more efficient data platform development and governance: - Syntax highlighting for SQL: Makes it easy to distinguish different parts of your code, reducing syntax errors and enhancing readability. - Auto-completion: Suggests table names, arguments, and column names as you type, saving time and reducing typos. @@ -44,7 +44,7 @@ To improve your experience using dbt Cloud, we suggest that you turn off ad bloc ## dbt Cloud IDE features -The dbt Cloud IDE comes with [tips](/docs/cloud/dbt-cloud-ide/dbt-cloud-tips) and [features](/docs/cloud/dbt-cloud-ide/ide-user-interface) that make it easier for you to develop, build, compile, run, and test data models. +The dbt Cloud IDE comes with [tips](/docs/build/dbt-tips) and [features](/docs/cloud/dbt-cloud-ide/ide-user-interface) that make it easier for you to develop, build, compile, run, and test data models. :::tip Stay informed @@ -54,7 +54,7 @@ To stay informed on IDE updates, read [dbt Cloud IDE release notes](/tags/ide), | Feature | Info | |---|---| -| **Keyboard shortcuts** | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/dbt-cloud-tips#cloud-ide-keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. This includes the command palette (Command-P or Control-P), which has common shortcuts and build commands to optimize your developer workflow. For example, you can build modified models or continue the build from the last failure point. | +| **Keyboard shortcuts** | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. This includes the command palette (Command-P or Control-P), which has common shortcuts and build commands to optimize your developer workflow. For example, you can build modified models or continue the build from the last failure point. | | **File state indicators** | Ability to see when changes or actions have been made to the file. The indicators **M, D, A,** and **•** appear to the right of your file or folder name and indicate the actions performed:

- Unsaved **(•)** — The IDE detects unsaved changes to your file/folder
- Modification **(M)** — The IDE detects a modification of existing files/folders
- Added **(A)** — The IDE detects added files
- Deleted **(D)** — The IDE detects deleted files. | **IDE version control** | The IDE version control section and git button allow you to apply the concept of [version control](/docs/collaborate/git/version-control-basics) to your project directly into the IDE.

- Create or change branches
- Commit or revert individual files by right-clicking the edited file
- [Resolve merge conflicts](/docs/collaborate/git/merge-conflicts)
- Execute git commands using the git button
- Link to the repo directly by clicking the branch name | | **Project documentation** | Generate and view your [project documentation](/docs/collaborate/build-and-view-your-docs) for your dbt project in real-time. You can inspect and verify what your project's documentation will look like before you deploy your changes to production. | diff --git a/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md b/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md index 05910b23e7f..3c8cd641716 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md @@ -53,7 +53,7 @@ The IDE features some delightful tools and layouts to make it easier for you to 1. **File Editor —** The File Editor is where users edit code. Tabs break out the region for each opened file, and unsaved files are marked with a blue dot icon in the tab view. - * Use intuitive [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/dbt-cloud-tips#cloud-ide-keyboard-shortcuts) to help develop easier for you and your team. + * Use intuitive [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/-keyboard-shortcuts) to help develop easier for you and your team. 2. **Save button —** The editor has a **Save** button that saves editable files. Pressing the button or using the Command-S or Control-S shortcut saves the file contents. You don't need to save to preview code results in the Console section, but it's necessary before changes appear in a dbt invocation. The File Editor tab shows a blue icon for unsaved changes. diff --git a/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md b/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md new file mode 100644 index 00000000000..a50ba5ccdb9 --- /dev/null +++ b/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md @@ -0,0 +1,43 @@ +--- +title: "dbt Cloud IDE keyboard shortcuts" +description: "Learn about the keyboard shortcuts available in the Cloud IDE." +sidebar_label: "Keyboard shortcuts" +--- + + +The Cloud IDE provides keyboard shortcuts, features, and development tips to help you work faster and be more productive. + +Use this dbt Cloud IDE page to help you quickly reference some common operations. + +| Shortcut description | macOS | Windows | +|--------|----------------|------------------| +| View a full list of editor shortcuts | Fn-F1 | Fn-F1 | +| Select a file to open | Command-O | Control-O | +| Open the command palette | Command-P or Command-Shift-P | Control-P or Control-Shift-P | +| Multi-edit by selecting multiple lines | Option-click or Shift-Option-Command | Hold Alt and click | +| Preview code | Command-Enter | Control-Enter | +| Compile code | Command-Shift-Enter | Control-Shift-Enter | +| Preview or Compile selected code | (Use the above shortcuts) | (Use the above shortcuts) | +| Reveal a list of dbt functions | Enter two underscores `__` | Enter two underscores `__` | +| Toggle the Invocation history | Control-backtick (`) | Control-backtick (`) | +| Add a block comment to selected code. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`. Markdown files will use the Markdown syntax `()` | Command-Option-/ | Control-Alt-/ | +| Close the currently active editor tab | Option-W | Alt-W | + + +- Press Fn-F1 to view a full list of the editor shortcuts +- Command-O on macOS or Control-O on Windows to select a file to open +- Command-P/Command-Shift-P on macOS or Control-P/Control-Shift-P on Windows to see the command palette +- Hold Option-click-on-area or press Shift-Option-Command on macOS or Hold-Alt-click-on-area on Windows to select multiple lines and perform a multi-edit. You can also press Command-E to perform this operation on the command line. +- Command-Enter on macOS or Control-Enter on Windows to Preview your code +- Command-Shift-Enter on macOS or Control-Shift-Enter on Windows to Compile +- Highlight a portion of code and use the above shortcuts to Preview or Compile code +- Enter two underscores (__) in the IDE to reveal a list of dbt functions +- Press Control-backtick (or Ctrl + `) to toggle the Invocation history +- Press Command-Option-forward slash on macOS or Control-Alt-forward slash on Windows on the selected code to add a block comment. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`. Markdown files will use the Markdown syntax `()` +- Option-W on macOS or Alt-W on Windows will close the currently active editor tab + +## Related docs + +- [Quickstart guide](/guides) +- [About dbt Cloud](/docs/cloud/about-cloud/dbt-cloud-features) +- [Develop in the Cloud](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/lint-format.md b/website/docs/docs/cloud/dbt-cloud-ide/lint-format.md index f145e76df11..733ec9dbcfe 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/lint-format.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/lint-format.md @@ -236,4 +236,4 @@ Make sure you're on a development branch. Formatting or Linting isn't available ## Related docs - [User interface](/docs/cloud/dbt-cloud-ide/ide-user-interface) -- [Tips and tricks](/docs/cloud/dbt-cloud-ide/dbt-cloud-tips) +- [Keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) diff --git a/website/sidebars.js b/website/sidebars.js index 598fffc7f0d..1401211639b 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -245,9 +245,9 @@ const sidebarSettings = { link: { type: "doc", id: "docs/cloud/dbt-cloud-ide/develop-in-the-cloud" }, items: [ "docs/cloud/dbt-cloud-ide/develop-in-the-cloud", + "docs/cloud/dbt-cloud-ide/keyboard-shortcuts", "docs/cloud/dbt-cloud-ide/ide-user-interface", "docs/cloud/dbt-cloud-ide/lint-format", - "docs/cloud/dbt-cloud-ide/dbt-cloud-tips", ], }, ], @@ -259,6 +259,7 @@ const sidebarSettings = { link: { type: "doc", id: "docs/build/projects" }, items: [ "docs/build/projects", + "docs/build/dbt-tips", { type: "category", label: "Build your DAG", diff --git a/website/vercel.json b/website/vercel.json index 3377b49278d..c2ca6f52d6c 100644 --- a/website/vercel.json +++ b/website/vercel.json @@ -2,6 +2,11 @@ "cleanUrls": true, "trailingSlash": false, "redirects": [ + { + "source": "/docs/cloud/dbt-cloud-ide/dbt-cloud-tips", + "destination": "/docs/build/dbt-tips", + "permanent": true + }, { "source": "/docs/cloud/dbt-cloud-ide", "destination": "/docs/cloud/dbt-cloud-ide/develop-in-the-cloud", From 3c97f4523f0a1aaa8733df37e136b604c331643c Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 12 Dec 2023 13:17:23 -0500 Subject: [PATCH 23/65] fi link --- website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md b/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md index 3c8cd641716..2038d4ad64c 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md @@ -53,7 +53,7 @@ The IDE features some delightful tools and layouts to make it easier for you to 1. **File Editor —** The File Editor is where users edit code. Tabs break out the region for each opened file, and unsaved files are marked with a blue dot icon in the tab view. - * Use intuitive [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/-keyboard-shortcuts) to help develop easier for you and your team. + * Use intuitive [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) to help develop easier for you and your team. 2. **Save button —** The editor has a **Save** button that saves editable files. Pressing the button or using the Command-S or Control-S shortcut saves the file contents. You don't need to save to preview code results in the Console section, but it's necessary before changes appear in a dbt invocation. The File Editor tab shows a blue icon for unsaved changes. From 6f77ff85ee1697ea2622add94b44f822f0513921 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 13 Dec 2023 15:26:53 -0500 Subject: [PATCH 24/65] add links to the new on_configuration_change page, update "learn more" links to be consistent --- .../resource-configs/bigquery-configs.md | 34 +++++++++---------- .../resource-configs/postgres-configs.md | 17 +++++----- .../resource-configs/redshift-configs.md | 26 +++++++------- .../resource-configs/snowflake-configs.md | 20 +++++------ 4 files changed, 48 insertions(+), 49 deletions(-) diff --git a/website/docs/reference/resource-configs/bigquery-configs.md b/website/docs/reference/resource-configs/bigquery-configs.md index d3497a02caf..8f323bc4236 100644 --- a/website/docs/reference/resource-configs/bigquery-configs.md +++ b/website/docs/reference/resource-configs/bigquery-configs.md @@ -725,18 +725,18 @@ The `grant_access_to` config is not thread-safe when multiple views need to be a The BigQuery adapter supports [materialized views](https://cloud.google.com/bigquery/docs/materialized-views-intro) with the following configuration parameters: -| Parameter | Type | Required | Default | Change Monitoring Support | -|-------------------------------------------------------------|------------------------|----------|---------|---------------------------| -| `on_configuration_change` | `` | no | `apply` | n/a | -| [`cluster_by`](#clustering-clause) | `[]` | no | `none` | drop/create | -| [`partition_by`](#partition-clause) | `{}` | no | `none` | drop/create | -| [`enable_refresh`](#auto-refresh) | `` | no | `true` | alter | -| [`refresh_interval_minutes`](#auto-refresh) | `` | no | `30` | alter | -| [`max_staleness`](#auto-refresh) (in Preview) | `` | no | `none` | alter | -| [`description`](/reference/resource-properties/description) | `` | no | `none` | alter | -| [`labels`](#specifying-labels) | `{: }` | no | `none` | alter | -| [`hours_to_expiration`](#controlling-table-expiration) | `` | no | `none` | alter | -| [`kms_key_name`](#using-kms-encryption) | `` | no | `none` | alter | +| Parameter | Type | Required | Default | Change Monitoring Support | +|----------------------------------------------------------------------------------|------------------------|----------|---------|---------------------------| +| [`on_configuration_change`](/reference/resource-configs/on_configuration_change) | `` | no | `apply` | n/a | +| [`cluster_by`](#clustering-clause) | `[]` | no | `none` | drop/create | +| [`partition_by`](#partition-clause) | `{}` | no | `none` | drop/create | +| [`enable_refresh`](#auto-refresh) | `` | no | `true` | alter | +| [`refresh_interval_minutes`](#auto-refresh) | `` | no | `30` | alter | +| [`max_staleness`](#auto-refresh) (in Preview) | `` | no | `none` | alter | +| [`description`](/reference/resource-properties/description) | `` | no | `none` | alter | +| [`labels`](#specifying-labels) | `{: }` | no | `none` | alter | +| [`hours_to_expiration`](#controlling-table-expiration) | `` | no | `none` | alter | +| [`kms_key_name`](#using-kms-encryption) | `` | no | `none` | alter | ](/reference/resource-configs/resource-path): [+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): materialized_view - [+](/reference/resource-configs/plus-prefix)on_configuration_change: apply | continue | fail + [+](/reference/resource-configs/plus-prefix)[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [+](/reference/resource-configs/plus-prefix)[cluster_by](#clustering-clause): | [] [+](/reference/resource-configs/plus-prefix)[partition_by](#partition-clause): - field: @@ -794,7 +794,7 @@ models: - name: [] config: [materialized](/reference/resource-configs/materialized): materialized_view - on_configuration_change: apply | continue | fail + [on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [cluster_by](#clustering-clause): | [] [partition_by](#partition-clause): - field: @@ -827,7 +827,7 @@ models: ```jinja {{ config( [materialized](/reference/resource-configs/materialized)='materialized_view', - on_configuration_change="apply" | "continue" | "fail", + [on_configuration_change](/reference/resource-configs/on_configuration_change)="apply" | "continue" | "fail", [cluster_by](#clustering-clause)="" | [""], [partition_by](#partition-clause)={ "field": "", @@ -868,7 +868,7 @@ models: Many of these parameters correspond to their table counterparts and have been linked above. The set of parameters unique to materialized views covers [auto-refresh functionality](#auto-refresh). -Find more information about these parameters in the BigQuery docs: +Learn more about these parameters in BigQuery's docs: - [CREATE MATERIALIZED VIEW statement](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_materialized_view_statement) - [materialized_view_option_list](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#materialized_view_option_list) @@ -886,7 +886,7 @@ BigQuery only officially supports the configuration of the frequency (the "once however, there is a feature in preview that allows for the configuration of the staleness (the "5 minutes" refresh). dbt will monitor these parameters for changes and apply them using an `ALTER` statement. -Find more information about these parameters in the BigQuery docs: +Learn more about these parameters in BigQuery's docs: - [materialized_view_option_list](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#materialized_view_option_list) - [max_staleness](https://cloud.google.com/bigquery/docs/materialized-views-create#max_staleness) diff --git a/website/docs/reference/resource-configs/postgres-configs.md b/website/docs/reference/resource-configs/postgres-configs.md index 8465a5cbb31..fc0e8d136ee 100644 --- a/website/docs/reference/resource-configs/postgres-configs.md +++ b/website/docs/reference/resource-configs/postgres-configs.md @@ -111,10 +111,10 @@ models: The Postgres adapter supports [materialized views](https://www.postgresql.org/docs/current/rules-materializedviews.html) with the following configuration parameters: -| Parameter | Type | Required | Default | Change Monitoring Support | -|---------------------------|--------------------|----------|---------|---------------------------| -| `on_configuration_change` | `` | no | `apply` | n/a | -| [`indexes`](#indexes) | `[{}]` | no | `none` | alter | +| Parameter | Type | Required | Default | Change Monitoring Support | +|----------------------------------------------------------------------------------|--------------------|----------|---------|---------------------------| +| [`on_configuration_change`](/reference/resource-configs/on_configuration_change) | `` | no | `apply` | n/a | +| [`indexes`](#indexes) | `[{}]` | no | `none` | alter | ](/reference/resource-configs/resource-path): [+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): materialized_view - [+](/reference/resource-configs/plus-prefix)on_configuration_change: apply | continue | fail + [+](/reference/resource-configs/plus-prefix)[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [+](/reference/resource-configs/plus-prefix)[indexes](#indexes): - columns: [] unique: true | false @@ -158,7 +158,7 @@ models: - name: [] config: [materialized](/reference/resource-configs/materialized): materialized_view - on_configuration_change: apply | continue | fail + [on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [indexes](#indexes): - columns: [] unique: true | false @@ -177,7 +177,7 @@ models: ```jinja {{ config( [materialized](/reference/resource-configs/materialized)="materialized_view", - on_configuration_change="apply" | "continue" | "fail", + [on_configuration_change](/reference/resource-configs/on_configuration_change)="apply" | "continue" | "fail", [indexes](#indexes)=[ { "columns": [""], @@ -198,8 +198,7 @@ The [`indexes`](#indexes) parameter corresponds to that of a table, as explained It's worth noting that, unlike tables, dbt monitors this parameter for changes and applies the changes without dropping the materialized view. This happens via a `DROP/CREATE` of the indexes, which can be thought of as an `ALTER` of the materialized view. -Find more information about materialized view parameters in the Postgres docs: -- [CREATE MATERIALIZED VIEW](https://www.postgresql.org/docs/current/sql-creatematerializedview.html) +Learn more about these parameters in Postgres's [docs](https://www.postgresql.org/docs/current/sql-creatematerializedview.html). diff --git a/website/docs/reference/resource-configs/redshift-configs.md b/website/docs/reference/resource-configs/redshift-configs.md index b559c0451b0..4de4b100d72 100644 --- a/website/docs/reference/resource-configs/redshift-configs.md +++ b/website/docs/reference/resource-configs/redshift-configs.md @@ -114,14 +114,14 @@ models: The Redshift adapter supports [materialized views](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-overview.html) with the following configuration parameters: -| Parameter | Type | Required | Default | Change Monitoring Support | -|-------------------------------------------|--------------|----------|------------------------------------------------|---------------------------| -| `on_configuration_change` | `` | no | `apply` | n/a | -| [`dist`](#using-sortkey-and-distkey) | `` | no | `even` | drop/create | -| [`sort`](#using-sortkey-and-distkey) | `[]` | no | `none` | drop/create | -| [`sort_type`](#using-sortkey-and-distkey) | `` | no | `auto` if no `sort`
`compound` if `sort` | drop/create | -| [`auto_refresh`](#auto-refresh) | `` | no | `false` | alter | -| [`backup`](#backup) | `` | no | `true` | n/a | +| Parameter | Type | Required | Default | Change Monitoring Support | +|----------------------------------------------------------------------------------|--------------|----------|------------------------------------------------|---------------------------| +| [`on_configuration_change`](/reference/resource-configs/on_configuration_change) | `` | no | `apply` | n/a | +| [`dist`](#using-sortkey-and-distkey) | `` | no | `even` | drop/create | +| [`sort`](#using-sortkey-and-distkey) | `[]` | no | `none` | drop/create | +| [`sort_type`](#using-sortkey-and-distkey) | `` | no | `auto` if no `sort`
`compound` if `sort` | drop/create | +| [`auto_refresh`](#auto-refresh) | `` | no | `false` | alter | +| [`backup`](#backup) | `` | no | `true` | n/a | ](/reference/resource-configs/resource-path): [+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): materialized_view - [+](/reference/resource-configs/plus-prefix)on_configuration_change: apply | continue | fail + [+](/reference/resource-configs/plus-prefix)[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [+](/reference/resource-configs/plus-prefix)[dist](#using-sortkey-and-distkey): all | auto | even | [+](/reference/resource-configs/plus-prefix)[sort](#using-sortkey-and-distkey): | [] [+](/reference/resource-configs/plus-prefix)[sort_type](#using-sortkey-and-distkey): auto | compound | interleaved @@ -166,7 +166,7 @@ models: - name: [] config: [materialized](/reference/resource-configs/materialized): materialized_view - on_configuration_change: apply | continue | fail + [on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [dist](#using-sortkey-and-distkey): all | auto | even | [sort](#using-sortkey-and-distkey): | [] [sort_type](#using-sortkey-and-distkey): auto | compound | interleaved @@ -186,7 +186,7 @@ models: ```jinja {{ config( [materialized](/reference/resource-configs/materialized)="materialized_view", - on_configuration_change="apply" | "continue" | "fail", + [on_configuration_change](/reference/resource-configs/on_configuration_change)="apply" | "continue" | "fail", [dist](#using-sortkey-and-distkey)="all" | "auto" | "even" | "", [sort](#using-sortkey-and-distkey)=[""], [sort_type](#using-sortkey-and-distkey)="auto" | "compound" | "interleaved", @@ -204,7 +204,7 @@ models: Many of these parameters correspond to their table counterparts and have been linked above. The parameters unique to materialized views are the [auto-refresh](#auto-refresh) and [backup](#backup) functionality, which are covered below. -Find more information about the [CREATE MATERIALIZED VIEW](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-create-sql-command.html) parameters in the Redshift docs. +Learn more about these parameters in Redshift's [docs](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-create-sql-command.html). #### Auto-refresh @@ -230,7 +230,7 @@ By default, a materialized view will be backed up during a cluster snapshot. dbt cannot monitor this parameter as it is not queryable within Redshift. If the value is changed, the materialized view will need to go through a `--full-refresh` in order to set it. -Learn more about the [parameters](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-create-sql-command.html#mv_CREATE_MATERIALIZED_VIEW-parameters) in the Redshift docs. +Learn more about these parameters in Redshift's [docs](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-create-sql-command.html#mv_CREATE_MATERIALIZED_VIEW-parameters). ### Limitations diff --git a/website/docs/reference/resource-configs/snowflake-configs.md b/website/docs/reference/resource-configs/snowflake-configs.md index aa2bf370df6..ecc1e75ee94 100644 --- a/website/docs/reference/resource-configs/snowflake-configs.md +++ b/website/docs/reference/resource-configs/snowflake-configs.md @@ -355,11 +355,11 @@ of [materialized views](/docs/build/materializations#Materialized-View). In particular, dynamic tables have access to the `on_configuration_change` setting. Dynamic tables are supported with the following configuration parameters: -| Parameter | Type | Required | Default | Change Monitoring Support | -|----------------------------------------------------------|------------|----------|---------|---------------------------| -| `on_configuration_change` | `` | no | `apply` | n/a | -| [`target_lag`](#target-lag) | `` | yes | | alter | -| [`snowflake_warehouse`](#configuring-virtual-warehouses) | `` | yes | | alter | +| Parameter | Type | Required | Default | Change Monitoring Support | +|----------------------------------------------------------------------------------|------------|----------|---------|---------------------------| +| [`on_configuration_change`](/reference/resource-configs/on_configuration_change) | `` | no | `apply` | n/a | +| [`target_lag`](#target-lag) | `` | yes | | alter | +| [`snowflake_warehouse`](#configuring-virtual-warehouses) | `` | yes | | alter | ](/reference/resource-configs/resource-path): [+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): dynamic_table - [+](/reference/resource-configs/plus-prefix)on_configuration_change: apply | continue | fail + [+](/reference/resource-configs/plus-prefix)[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [+](/reference/resource-configs/plus-prefix)[target_lag](#target-lag): downstream | [+](/reference/resource-configs/plus-prefix)[snowflake_warehouse](#configuring-virtual-warehouses): ``` @@ -401,7 +401,7 @@ models: - name: [] config: [materialized](/reference/resource-configs/materialized): dynamic_table - on_configuration_change: apply | continue | fail + [on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail [target_lag](#target-lag): downstream | [snowflake_warehouse](#configuring-virtual-warehouses): ``` @@ -418,7 +418,7 @@ models: ```jinja {{ config( [materialized](/reference/resource-configs/materialized)="dynamic_table", - on_configuration_change="apply" | "continue" | "fail", + [on_configuration_change](/reference/resource-configs/on_configuration_change)="apply" | "continue" | "fail", [target_lag](#target-lag)="downstream" | " seconds | minutes | hours | days", [snowflake_warehouse](#configuring-virtual-warehouses)="", ) }} @@ -430,7 +430,7 @@ models: -Find more information about these parameters in Snowflake's [docs](https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table): +Learn more about these parameters in Snowflake's [docs](https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table): ### Target lag @@ -438,7 +438,7 @@ Snowflake allows two configuration scenarios for scheduling automatic refreshes: - **Time-based** — Provide a value of the form ` { seconds | minutes | hours | days }`. For example, if the dynamic table needs to be updated every 30 minutes, use `target_lag='30 minutes'`. - **Downstream** — Applicable when the dynamic table is referenced by other dynamic tables. In this scenario, `target_lag='downstream'` allows for refreshes to be controlled at the target, instead of at each layer. -Find more information about `target_lag` in Snowflake's [docs](https://docs.snowflake.com/en/user-guide/dynamic-tables-refresh#understanding-target-lag). +Learn more about `target_lag` in Snowflake's [docs](https://docs.snowflake.com/en/user-guide/dynamic-tables-refresh#understanding-target-lag). ### Limitations From 062abb5ac510607218a2a5a82575397e4022b14b Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 13 Dec 2023 18:41:04 -0500 Subject: [PATCH 25/65] add on_configuration_change to dbt-versions.js with first version 1.6 --- website/dbt-versions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/dbt-versions.js b/website/dbt-versions.js index be55c893041..abba3307f6f 100644 --- a/website/dbt-versions.js +++ b/website/dbt-versions.js @@ -177,6 +177,10 @@ exports.versionedPages = [ { "page": "docs/build/saved-queries", "firstVersion": "1.7", + }, + { + "page": "reference/resource-configs/on_configuration_change", + "firstVersion": "1.6", } ] From 292a2fa06f6c571519d83b7f9ff3c4ba1d91f0b0 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 15 Dec 2023 09:58:05 -0500 Subject: [PATCH 26/65] updates --- website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md b/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md index a50ba5ccdb9..56ba020b8d7 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md @@ -13,13 +13,12 @@ Use this dbt Cloud IDE page to help you quickly reference some common operation |--------|----------------|------------------| | View a full list of editor shortcuts | Fn-F1 | Fn-F1 | | Select a file to open | Command-O | Control-O | -| Open the command palette | Command-P or Command-Shift-P | Control-P or Control-Shift-P | +| Open the command palette to invoke dbt commands and actions | Command-P or Command-Shift-P | Control-P or Control-Shift-P | | Multi-edit by selecting multiple lines | Option-click or Shift-Option-Command | Hold Alt and click | | Preview code | Command-Enter | Control-Enter | | Compile code | Command-Shift-Enter | Control-Shift-Enter | -| Preview or Compile selected code | (Use the above shortcuts) | (Use the above shortcuts) | | Reveal a list of dbt functions | Enter two underscores `__` | Enter two underscores `__` | -| Toggle the Invocation history | Control-backtick (`) | Control-backtick (`) | +| Toggle open the [Invocation history drawer](/docs/cloud/dbt-cloud-ide/ide-user-interface#invocation-history) located on the bottom of the IDE. | Control-backtick (`) | Control-backtick (`) | | Add a block comment to selected code. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`. Markdown files will use the Markdown syntax `()` | Command-Option-/ | Control-Alt-/ | | Close the currently active editor tab | Option-W | Alt-W | From c9ce5465bd5464326830ad61fbd13beae48b3c53 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 15 Dec 2023 15:24:18 -0500 Subject: [PATCH 27/65] update behavior adn code --- website/src/components/detailsToggle/index.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/src/components/detailsToggle/index.js b/website/src/components/detailsToggle/index.js index 90464328f8b..ba53192e54b 100644 --- a/website/src/components/detailsToggle/index.js +++ b/website/src/components/detailsToggle/index.js @@ -7,29 +7,29 @@ function detailsToggle({ children, alt_header = null }) { const [hoverTimeout, setHoverTimeout] = useState(null); const handleToggleClick = () => { - setOn(false); - setHoverActive(isOn); // Toggle hover activation based on current state - }; + setHoverActive(true); // Disable hover when clicked + setOn(current => !current); // Toggle the current state +}; - const handleMouseEnter = () => { - if (!hoverActive) return; // Ignore hover if disabled - const timeout = setTimeout(() => { - setOn(true); - }, 500); // 500ms delay - setHoverTimeout(timeout); - }; +const handleMouseEnter = () => { + if (isOn) return; // Ignore hover if already open + setHoverActive(true); // Enable hover + const timeout = setTimeout(() => { + if (hoverActive) setOn(true); + }, 500); + setHoverTimeout(timeout); +}; - const handleMouseLeave = () => { - if (hoverActive && !isOn) { +const handleMouseLeave = () => { + if (!isOn) { clearTimeout(hoverTimeout); setOn(false); - // isOn (false); can't be used here but setOn triggers a re-render - } - }; + } +}; - useEffect(() => { - return () => clearTimeout(hoverTimeout); - }, [hoverTimeout]); +useEffect(() => { + return () => clearTimeout(hoverTimeout); +}, [hoverTimeout]); return (
From 8c7913dee94d5ee88ad589de25b698b1d6780d86 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:38:53 -0500 Subject: [PATCH 28/65] Update _sl-faqs.md --- website/snippets/_sl-faqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-faqs.md b/website/snippets/_sl-faqs.md index 092929e1066..75583bfa2f6 100644 --- a/website/snippets/_sl-faqs.md +++ b/website/snippets/_sl-faqs.md @@ -44,7 +44,7 @@ If you're using the legacy Semantic Layer, we highly recommend you [upgrade your - + User data passes through the Semantic Layer on its way back from the warehouse. dbt Labs ensures security by authenticating through the customer's data warehouse. Currently, we don't cache data for the long term, but it might temporarily stay in the system for up to 10 minutes, usually less. In the future, we'll introduce a caching feature that allows us to cache data on our infrastructure for up to 24 hours. From cdc4ea268d720773b2e34a597ffedf3b4f329368 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:43:03 -0700 Subject: [PATCH 29/65] Remove period from blog post title --- website/blog/2023-12-11-semantic-layer-on-semantic-layer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2023-12-11-semantic-layer-on-semantic-layer.md b/website/blog/2023-12-11-semantic-layer-on-semantic-layer.md index ea77072a6dd..44499c51ec5 100644 --- a/website/blog/2023-12-11-semantic-layer-on-semantic-layer.md +++ b/website/blog/2023-12-11-semantic-layer-on-semantic-layer.md @@ -1,5 +1,5 @@ --- -title: "How we built consistent product launch metrics with the dbt Semantic Layer." +title: "How we built consistent product launch metrics with the dbt Semantic Layer" description: "We built an end-to-end data pipeline for measuring the launch of the dbt Semantic Layer using the dbt Semantic Layer." slug: product-analytics-pipeline-with-dbt-semantic-layer From 05523d4c34078676212d6186f11aab10f86b7113 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:49:08 -0700 Subject: [PATCH 30/65] Only display intro (rather than entire article) during listing of blog posts --- .../blog/2023-05-02-modeling-ragged-time-varying-hierarchies.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/blog/2023-05-02-modeling-ragged-time-varying-hierarchies.md b/website/blog/2023-05-02-modeling-ragged-time-varying-hierarchies.md index d436df2628a..f719bdb40cb 100644 --- a/website/blog/2023-05-02-modeling-ragged-time-varying-hierarchies.md +++ b/website/blog/2023-05-02-modeling-ragged-time-varying-hierarchies.md @@ -16,6 +16,8 @@ This article covers an approach to handling time-varying ragged hierarchies in a To help visualize this data, we're going to pretend we are a company that manufactures and rents out eBikes in a ride share application. When we build a bike, we keep track of the serial numbers of the components that make up the bike. Any time something breaks and needs to be replaced, we track the old parts that were removed and the new parts that were installed. We also precisely track the mileage accumulated on each of our bikes. Our primary analytical goal is to be able to report on the expected lifetime of each component, so we can prioritize improving that component and reduce costly maintenance. + + ## Data model Obviously, a real bike could have a hundred or more separate components. To keep things simple for this article, let's just consider the bike, the frame, a wheel, the wheel rim, tire, and tube. Our component hierarchy looks like: From 06eab8869538e82d4fce29585b6f77ed3beb6b62 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:38:12 -0700 Subject: [PATCH 31/65] Fix spelling --- website/docs/best-practices/clone-incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/best-practices/clone-incremental-models.md b/website/docs/best-practices/clone-incremental-models.md index 4096af489ab..c2dc217231c 100644 --- a/website/docs/best-practices/clone-incremental-models.md +++ b/website/docs/best-practices/clone-incremental-models.md @@ -35,7 +35,7 @@ This can be suboptimal because: - Typically incremental models are your largest datasets, so they take a long time to build in their entirety which can slow down development time and incur high warehouse costs. - There are situations where a `full-refresh` of the incremental model passes successfully in your CI job but an _incremental_ build of that same table in prod would fail when the PR is merged into main (think schema drift where [on_schema_change](/docs/build/incremental-models#what-if-the-columns-of-my-incremental-model-change) config is set to `fail`) -You can alleviate these problems by zero copy cloning the relevant, pre-exisitng incremental models into your PR-specific schema as the first step of the CI job using the `dbt clone` command. This way, the incremental models already exist in the PR-specific schema when you first execute the command `dbt build --select state:modified+` so the `is_incremental` flag will be `true`. +You can alleviate these problems by zero copy cloning the relevant, pre-existing incremental models into your PR-specific schema as the first step of the CI job using the `dbt clone` command. This way, the incremental models already exist in the PR-specific schema when you first execute the command `dbt build --select state:modified+` so the `is_incremental` flag will be `true`. You'll have two commands for your dbt Cloud CI check to execute: 1. Clone all of the pre-existing incremental models that have been modified or are downstream of another model that has been modified: `dbt clone --select state:modified+,config.materialized:incremental,state:old` From 9bc167c00af8c22f716fa9951018ec4062253d23 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:42:04 -0700 Subject: [PATCH 32/65] Copy-pasteable commands --- .../docs/best-practices/clone-incremental-models.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/website/docs/best-practices/clone-incremental-models.md b/website/docs/best-practices/clone-incremental-models.md index c2dc217231c..bb55ecd88f8 100644 --- a/website/docs/best-practices/clone-incremental-models.md +++ b/website/docs/best-practices/clone-incremental-models.md @@ -38,8 +38,14 @@ This can be suboptimal because: You can alleviate these problems by zero copy cloning the relevant, pre-existing incremental models into your PR-specific schema as the first step of the CI job using the `dbt clone` command. This way, the incremental models already exist in the PR-specific schema when you first execute the command `dbt build --select state:modified+` so the `is_incremental` flag will be `true`. You'll have two commands for your dbt Cloud CI check to execute: -1. Clone all of the pre-existing incremental models that have been modified or are downstream of another model that has been modified: `dbt clone --select state:modified+,config.materialized:incremental,state:old` -2. Build all of the models that have been modified and their downstream dependencies: `dbt build --select state:modified+` +1. Clone all of the pre-existing incremental models that have been modified or are downstream of another model that has been modified: + ```shell + dbt clone --select state:modified+,config.materialized:incremental,state:old + ``` +2. Build all of the models that have been modified and their downstream dependencies: + ```shell + dbt build --select state:modified+` + ``` Because of your first clone step, the incremental models selected in your `dbt build` on the second step will run in incremental mode. From 8d04adeca7f33d02d8b2144c114136cf4d64c46e Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 15 Dec 2023 17:02:38 -0700 Subject: [PATCH 33/65] Remove rogue backtick --- website/docs/best-practices/clone-incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/best-practices/clone-incremental-models.md b/website/docs/best-practices/clone-incremental-models.md index bb55ecd88f8..11075b92161 100644 --- a/website/docs/best-practices/clone-incremental-models.md +++ b/website/docs/best-practices/clone-incremental-models.md @@ -44,7 +44,7 @@ You'll have two commands for your dbt Cloud CI check to execute: ``` 2. Build all of the models that have been modified and their downstream dependencies: ```shell - dbt build --select state:modified+` + dbt build --select state:modified+ ``` Because of your first clone step, the incremental models selected in your `dbt build` on the second step will run in incremental mode. From 7ad36fdb848d35009f57c1939b24032e9f67861a Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Sun, 17 Dec 2023 11:15:58 -0700 Subject: [PATCH 34/65] Update dbt_project.yml.md Remove duplicated content --- website/docs/reference/dbt_project.yml.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index d130b5cf1f5..9252d13681f 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -25,28 +25,6 @@ Something to note, you can't set up a "property" in the `dbt_project.yml` file i The following example is a list of all available configurations in the `dbt_project.yml` file: - - - -By default, dbt will look for `dbt_project.yml` in your current working directory and its parents, but you can set a different directory using the `--project-dir` flag. - - - - - -By default, dbt will look for `dbt_project.yml` in your current working directory and its parents, but you can set a different directory using the `--project-dir` flag or the `DBT_PROJECT_DIR` environment variable. - -Starting from dbt v1.5 and higher, you can specify your dbt Cloud project ID in the `dbt_project.yml` file using `project-id` under the `dbt-cloud` config. To find your project ID, check your dbt Cloud project URL, such as `https://cloud.getdbt.com/11/projects/123456`, where the project ID is `123456`. - - - -The following is a list of all available configurations in the `dbt_project.yml` file. - -:::info YAML syntax -dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries and strings are represented. -::: - - From c26bc3965a4bfb0c72eb8f128ddc21a28cded1b5 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Sun, 17 Dec 2023 11:27:13 -0700 Subject: [PATCH 35/65] Remove extra newline --- website/docs/reference/dbt_project.yml.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 9252d13681f..a5ad601f78b 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -16,7 +16,6 @@ Starting from dbt v1.5 and higher, you can specify your dbt Cloud project ID in :::info YAML syntax - dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries, and strings are represented. ::: From eca769c4c039407207a33bf9f554e438489fbe4f Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 06:01:18 -0500 Subject: [PATCH 36/65] link to clone in ci job best practices this pr adds a link to the clone in a ci job best practices guide as a callout per slack request https://dbt-labs.slack.com/archives/C02NCQ9483C/p1702655617781059 --- website/blog/2023-10-31-to-defer-or-to-clone.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/blog/2023-10-31-to-defer-or-to-clone.md b/website/blog/2023-10-31-to-defer-or-to-clone.md index a39fc3ac0b7..2d72eee3297 100755 --- a/website/blog/2023-10-31-to-defer-or-to-clone.md +++ b/website/blog/2023-10-31-to-defer-or-to-clone.md @@ -91,6 +91,10 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore 2. **[Slim CI](https://discourse.getdbt.com/t/how-we-sped-up-our-ci-runs-by-10x-using-slim-ci/2603)** + :::tip Use `dbt clone` in CI jobs + Learn how to [use `dbt clone` in CI jobs](/best-practices/clone-incremental-models) to efficiently test modified incremental models, simulating post-merge behavior while avoiding full-refresh costs. + ::: + In this scenario, we want to: 1. Refer to production models wherever possible to speed up continuous integration (CI) runs 2. Only run and test models in the CI staging environment that have changed from the production environment @@ -98,7 +102,7 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore Therefore, we should use **defer** in this scenario -3. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** +4. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** In this scenario, we want to: 1. Ensure that all tests are always passing on the production dataset, even if that dataset is slightly stale From c1a6d9c9e3e5e50595deb09e8060044e290a1b1d Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 06:02:12 -0500 Subject: [PATCH 37/65] Update website/blog/2023-10-31-to-defer-or-to-clone.md --- website/blog/2023-10-31-to-defer-or-to-clone.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2023-10-31-to-defer-or-to-clone.md b/website/blog/2023-10-31-to-defer-or-to-clone.md index 2d72eee3297..4777022e5cd 100755 --- a/website/blog/2023-10-31-to-defer-or-to-clone.md +++ b/website/blog/2023-10-31-to-defer-or-to-clone.md @@ -102,7 +102,7 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore Therefore, we should use **defer** in this scenario -4. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** +3. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** In this scenario, we want to: 1. Ensure that all tests are always passing on the production dataset, even if that dataset is slightly stale From 301c8a9e04d559bacf80e0e7591d6e094064267f Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 06:03:30 -0500 Subject: [PATCH 38/65] Update website/blog/2023-10-31-to-defer-or-to-clone.md --- website/blog/2023-10-31-to-defer-or-to-clone.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2023-10-31-to-defer-or-to-clone.md b/website/blog/2023-10-31-to-defer-or-to-clone.md index 4777022e5cd..53b40f244dd 100755 --- a/website/blog/2023-10-31-to-defer-or-to-clone.md +++ b/website/blog/2023-10-31-to-defer-or-to-clone.md @@ -91,7 +91,7 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore 2. **[Slim CI](https://discourse.getdbt.com/t/how-we-sped-up-our-ci-runs-by-10x-using-slim-ci/2603)** - :::tip Use `dbt clone` in CI jobs + :::tip Use `dbt clone` in CI jobs to test incremental models Learn how to [use `dbt clone` in CI jobs](/best-practices/clone-incremental-models) to efficiently test modified incremental models, simulating post-merge behavior while avoiding full-refresh costs. ::: From 7d81a535342e01891f2d5837ded9975ef338e639 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 06:13:53 -0500 Subject: [PATCH 39/65] Update 2023-10-31-to-defer-or-to-clone.md --- website/blog/2023-10-31-to-defer-or-to-clone.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/blog/2023-10-31-to-defer-or-to-clone.md b/website/blog/2023-10-31-to-defer-or-to-clone.md index 53b40f244dd..9454ad11281 100755 --- a/website/blog/2023-10-31-to-defer-or-to-clone.md +++ b/website/blog/2023-10-31-to-defer-or-to-clone.md @@ -91,18 +91,18 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore 2. **[Slim CI](https://discourse.getdbt.com/t/how-we-sped-up-our-ci-runs-by-10x-using-slim-ci/2603)** - :::tip Use `dbt clone` in CI jobs to test incremental models - Learn how to [use `dbt clone` in CI jobs](/best-practices/clone-incremental-models) to efficiently test modified incremental models, simulating post-merge behavior while avoiding full-refresh costs. - ::: - In this scenario, we want to: 1. Refer to production models wherever possible to speed up continuous integration (CI) runs 2. Only run and test models in the CI staging environment that have changed from the production environment 3. Reference models from different environments – prod for unchanged models, and staging for modified models Therefore, we should use **defer** in this scenario + + :::tip Use `dbt clone` in CI jobs to test incremental models + Learn how to [use `dbt clone` in CI jobs](/best-practices/clone-incremental-models) to efficiently test modified incremental models, simulating post-merge behavior while avoiding full-refresh costs. + ::: -3. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** +4. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** In this scenario, we want to: 1. Ensure that all tests are always passing on the production dataset, even if that dataset is slightly stale From 25c2af99bde23bfe607004b9eb29188d67015b8b Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 06:48:37 -0500 Subject: [PATCH 40/65] Update 2023-10-31-to-defer-or-to-clone.md --- website/blog/2023-10-31-to-defer-or-to-clone.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/blog/2023-10-31-to-defer-or-to-clone.md b/website/blog/2023-10-31-to-defer-or-to-clone.md index 9454ad11281..00aa8c7f7e5 100755 --- a/website/blog/2023-10-31-to-defer-or-to-clone.md +++ b/website/blog/2023-10-31-to-defer-or-to-clone.md @@ -87,7 +87,7 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore 1. Make a copy of our production dataset available in our downstream BI tool 2. To safely iterate on this copy without breaking production datasets - Therefore, we should use **clone** in this scenario + Therefore, we should use **clone** in this scenario. 2. **[Slim CI](https://discourse.getdbt.com/t/how-we-sped-up-our-ci-runs-by-10x-using-slim-ci/2603)** @@ -96,13 +96,13 @@ Using the cheat sheet above, let’s explore a few common scenarios and explore 2. Only run and test models in the CI staging environment that have changed from the production environment 3. Reference models from different environments – prod for unchanged models, and staging for modified models - Therefore, we should use **defer** in this scenario + Therefore, we should use **defer** in this scenario. - :::tip Use `dbt clone` in CI jobs to test incremental models - Learn how to [use `dbt clone` in CI jobs](/best-practices/clone-incremental-models) to efficiently test modified incremental models, simulating post-merge behavior while avoiding full-refresh costs. - ::: +:::tip Use `dbt clone` in CI jobs to test incremental models +Learn how to [use `dbt clone` in CI jobs](/best-practices/clone-incremental-models) to efficiently test modified incremental models, simulating post-merge behavior while avoiding full-refresh costs. +::: -4. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** +3. **[Blue/Green Deployments](https://discourse.getdbt.com/t/performing-a-blue-green-deploy-of-your-dbt-project-on-snowflake/1349)** In this scenario, we want to: 1. Ensure that all tests are always passing on the production dataset, even if that dataset is slightly stale From c0792b83028e99dc130b0b3a2d25f18333cafd4c Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 07:00:33 -0500 Subject: [PATCH 41/65] final tweaks --- .../cloud/dbt-cloud-ide/keyboard-shortcuts.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md b/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md index 56ba020b8d7..121cab68ce7 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/keyboard-shortcuts.md @@ -18,23 +18,10 @@ Use this dbt Cloud IDE page to help you quickly reference some common operation | Preview code | Command-Enter | Control-Enter | | Compile code | Command-Shift-Enter | Control-Shift-Enter | | Reveal a list of dbt functions | Enter two underscores `__` | Enter two underscores `__` | -| Toggle open the [Invocation history drawer](/docs/cloud/dbt-cloud-ide/ide-user-interface#invocation-history) located on the bottom of the IDE. | Control-backtick (`) | Control-backtick (`) | -| Add a block comment to selected code. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`. Markdown files will use the Markdown syntax `()` | Command-Option-/ | Control-Alt-/ | +| Toggle open the [Invocation history drawer](/docs/cloud/dbt-cloud-ide/ide-user-interface#invocation-history) located on the bottom of the IDE. | Control-backtick (or Control + `) | Control-backtick (or Ctrl + `) | +| Add a block comment to selected code. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`.

Markdown files will use the Markdown syntax `()` | Command-Option-/ | Control-Alt-/ | | Close the currently active editor tab | Option-W | Alt-W | - -- Press Fn-F1 to view a full list of the editor shortcuts -- Command-O on macOS or Control-O on Windows to select a file to open -- Command-P/Command-Shift-P on macOS or Control-P/Control-Shift-P on Windows to see the command palette -- Hold Option-click-on-area or press Shift-Option-Command on macOS or Hold-Alt-click-on-area on Windows to select multiple lines and perform a multi-edit. You can also press Command-E to perform this operation on the command line. -- Command-Enter on macOS or Control-Enter on Windows to Preview your code -- Command-Shift-Enter on macOS or Control-Shift-Enter on Windows to Compile -- Highlight a portion of code and use the above shortcuts to Preview or Compile code -- Enter two underscores (__) in the IDE to reveal a list of dbt functions -- Press Control-backtick (or Ctrl + `) to toggle the Invocation history -- Press Command-Option-forward slash on macOS or Control-Alt-forward slash on Windows on the selected code to add a block comment. SQL files will use the Jinja syntax `({# #})` rather than the SQL one `(/* */)`. Markdown files will use the Markdown syntax `()` -- Option-W on macOS or Alt-W on Windows will close the currently active editor tab - ## Related docs - [Quickstart guide](/guides) From 4fe7eeb7510a689e15ce1c6f02fe7c4d0d0837cf Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 07:06:51 -0500 Subject: [PATCH 42/65] turn to table --- website/docs/docs/build/dbt-tips.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/website/docs/docs/build/dbt-tips.md b/website/docs/docs/build/dbt-tips.md index 50a31c127e6..005c97e41a1 100644 --- a/website/docs/docs/build/dbt-tips.md +++ b/website/docs/docs/build/dbt-tips.md @@ -5,17 +5,19 @@ sidebar_label: "dbt tips and tricks" pagination_next: null --- -Use this page to learn about any dbt-related tips and tricks to help you work faster and be more productive. You can also learn about the default dbt Cloud IDE keyboard shortcuts to help make development more productive and easier for everyone. +Use this page to learn about any dbt-related tips and tricks to help you work faster and be more productive. You can also learn about the default dbt Cloud IDE [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) to help make development more productive and easier for everyone. ## Package tips -- Use the [dbt_codegen](https://hub.getdbt.com/dbt-labs/codegen/latest/) package to help you generate YML files for your models and sources and SQL files for your staging models. -- The [dbt_utils](https://hub.getdbt.com/dbt-labs/dbt_utils/latest/) package contains macros useful for daily development. For example, `date_spine` generates a table with all dates between the ones provided as parameters. -- The [dbt_project_evaluator](https://hub.getdbt.com/dbt-labs/dbt_project_evaluator/latest) package compares your dbt project against a list of our best practices and provides suggestions and guidelines on how to update your models. -- The [dbt_expectations](https://hub.getdbt.com/calogica/dbt_expectations/latest) package contains many tests beyond those built into dbt Core. -- The [dbt_audit_helper](https://hub.getdbt.com/#:~:text=adwords-,audit_helper,-codegen) package lets you compare the output of 2 queries. Use it when refactoring existing logic to ensure that the new results are identical. -- The [dbt_artifacts](https://hub.getdbt.com/brooklyn-data/dbt_artifacts/latest) package saves information about your dbt runs directly to your data platform so that you can track the performance of models over time. -- The [dbt_meta_testing](https://hub.getdbt.com/tnightengale/dbt_meta_testing/latest) package checks that your dbt project is sufficiently tested and documented. +| Package | Description | +|---------|-------------| +| [`dbt_codegen`](https://hub.getdbt.com/dbt-labs/codegen/latest/) |Use the package to help you generate YML files for your models and sources and SQL files for your staging models. | +| [`dbt_utils`](https://hub.getdbt.com/dbt-labs/dbt_utils/latest/) | The package contains macros useful for daily development. For example, `date_spine` generates a table with all dates between the ones provided as parameters. | +| [`dbt_project_evaluator`](https://hub.getdbt.com/dbt-labs/dbt_project_evaluator/latest) | The package compares your dbt project against a list of our best practices and provides suggestions and guidelines on how to update your models. | +| [`dbt_expectations`](https://hub.getdbt.com/calogica/dbt_expectations/latest) | The package contains many tests beyond those built into dbt. | +| [`dbt_audit_helper`](https://hub.getdbt.com/#:~:text=adwords-,audit_helper,-codegen) | The package lets you compare the output of 2 queries. Use it when refactoring existing logic to ensure that the new results are identical. | +| [`dbt_artifacts`](https://hub.getdbt.com/brooklyn-data/dbt_artifacts/latest) | The package saves information about your dbt runs directly to your data platform so that you can track the performance of models over time. | +| [`dbt_meta_testing`](https://hub.getdbt.com/tnightengale/dbt_meta_testing/latest) | This package checks that your dbt project is sufficiently tested and documented. | ## Advanced tips From 5f242859847ef64f69b73a8f0a898f38ce25b3d3 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 07:07:28 -0500 Subject: [PATCH 43/65] add line --- website/docs/docs/build/dbt-tips.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/docs/build/dbt-tips.md b/website/docs/docs/build/dbt-tips.md index 005c97e41a1..b91e5eb91fe 100644 --- a/website/docs/docs/build/dbt-tips.md +++ b/website/docs/docs/build/dbt-tips.md @@ -5,7 +5,9 @@ sidebar_label: "dbt tips and tricks" pagination_next: null --- -Use this page to learn about any dbt-related tips and tricks to help you work faster and be more productive. You can also learn about the default dbt Cloud IDE [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) to help make development more productive and easier for everyone. +Use this page to learn about any dbt-related tips and tricks to help you work faster and be more productive. + +You can also learn about the default dbt Cloud IDE [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) to help make development more productive and easier for everyone. ## Package tips From bd8fa097b11e238f92e50ec1b626d9291a742490 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 07:16:34 -0500 Subject: [PATCH 44/65] Update vercel.json fix failure --- website/vercel.json | 1 + 1 file changed, 1 insertion(+) diff --git a/website/vercel.json b/website/vercel.json index 7bf4bf533d7..35799e24061 100644 --- a/website/vercel.json +++ b/website/vercel.json @@ -7,6 +7,7 @@ "destination": "/docs/build/dbt-tips", "permanent": true }, + { "source": "/docs/dbt-cloud-apis/discovery-schema-job-metric", "destination": "/docs/dbt-cloud-apis/discovery-schema-environment", "permanent": true From 574988e1792952fe06b0dada19f1322281806ab7 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 11:58:45 -0500 Subject: [PATCH 45/65] fold feedback --- website/docs/docs/build/dbt-tips.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/build/dbt-tips.md b/website/docs/docs/build/dbt-tips.md index b91e5eb91fe..e49dd2bd242 100644 --- a/website/docs/docs/build/dbt-tips.md +++ b/website/docs/docs/build/dbt-tips.md @@ -5,12 +5,19 @@ sidebar_label: "dbt tips and tricks" pagination_next: null --- -Use this page to learn about any dbt-related tips and tricks to help you work faster and be more productive. +Use this page for valuable insights and practical advice to enhance your dbt experience. Whether you're new to dbt or an experienced user, these tips are designed to help you work more efficiently and effectively. -You can also learn about the default dbt Cloud IDE [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) to help make development more productive and easier for everyone. +The following tips are organized into the following categories: +- [Package tips](#package-tips) +- [Advanced tips adn techniques](#advanced-tips-adn-techniques) +- [Related docs](#related-docs) + +If you're developing with the dbt Cloud IDE, you can refer to the [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) page to help make development more productive and easier for everyone. ## Package tips +Leverage these dbt packages to streamline your workflow: + | Package | Description | |---------|-------------| | [`dbt_codegen`](https://hub.getdbt.com/dbt-labs/codegen/latest/) |Use the package to help you generate YML files for your models and sources and SQL files for your staging models. | @@ -21,7 +28,7 @@ You can also learn about the default dbt Cloud IDE [keyboard shortcuts](/docs/cl | [`dbt_artifacts`](https://hub.getdbt.com/brooklyn-data/dbt_artifacts/latest) | The package saves information about your dbt runs directly to your data platform so that you can track the performance of models over time. | | [`dbt_meta_testing`](https://hub.getdbt.com/tnightengale/dbt_meta_testing/latest) | This package checks that your dbt project is sufficiently tested and documented. | -## Advanced tips +## Advanced tips adn techniques - Use your folder structure as your primary selector method. `dbt build --select marts.marketing` is simpler and more resilient than relying on tagging every model. - Think about jobs in terms of build cadences and SLAs. Run models that have hourly, daily, or weekly build cadences together. From ff0b5e9de9e879402cfe45181a8d999d81cf91ab Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 12:05:09 -0500 Subject: [PATCH 46/65] fold feedback --- website/docs/docs/build/dbt-tips.md | 9 +++++---- .../docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md | 9 +++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/website/docs/docs/build/dbt-tips.md b/website/docs/docs/build/dbt-tips.md index e49dd2bd242..681e6b93dfe 100644 --- a/website/docs/docs/build/dbt-tips.md +++ b/website/docs/docs/build/dbt-tips.md @@ -8,9 +8,10 @@ pagination_next: null Use this page for valuable insights and practical advice to enhance your dbt experience. Whether you're new to dbt or an experienced user, these tips are designed to help you work more efficiently and effectively. The following tips are organized into the following categories: -- [Package tips](#package-tips) -- [Advanced tips adn techniques](#advanced-tips-adn-techniques) -- [Related docs](#related-docs) + +- [Package tips](#package-tips) to help you streamline your workflow. +- [Advanced tips and techniques](#advanced-tips-adn-techniques) to help you get the most out of dbt. + If you're developing with the dbt Cloud IDE, you can refer to the [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) page to help make development more productive and easier for everyone. @@ -28,7 +29,7 @@ Leverage these dbt packages to streamline your workflow: | [`dbt_artifacts`](https://hub.getdbt.com/brooklyn-data/dbt_artifacts/latest) | The package saves information about your dbt runs directly to your data platform so that you can track the performance of models over time. | | [`dbt_meta_testing`](https://hub.getdbt.com/tnightengale/dbt_meta_testing/latest) | This package checks that your dbt project is sufficiently tested and documented. | -## Advanced tips adn techniques +## Advanced tips and techniques - Use your folder structure as your primary selector method. `dbt build --select marts.marketing` is simpler and more resilient than relying on tagging every model. - Think about jobs in terms of build cadences and SLAs. Run models that have hourly, daily, or weekly build cadences together. diff --git a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md index 30f5e1463a1..def74ee53ee 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md @@ -44,17 +44,14 @@ To improve your experience using dbt Cloud, we suggest that you turn off ad bloc ## dbt Cloud IDE features -The dbt Cloud IDE comes with [tips](/docs/build/dbt-tips) and [features](/docs/cloud/dbt-cloud-ide/ide-user-interface) that make it easier for you to develop, build, compile, run, and test data models. +The dbt Cloud IDE comes with [features](/docs/cloud/dbt-cloud-ide/ide-user-interface) that make it easier for you to develop, build, compile, run, and test data models. -:::tip Stay informed +To understand how to navigate the IDE and its user interface elements, refer to the [IDE user interface](/docs/cloud/dbt-cloud-ide/ide-user-interface) page. -To stay informed on IDE updates, read [dbt Cloud IDE release notes](/tags/ide), or refer to the [IDE user interface](/docs/cloud/dbt-cloud-ide/ide-user-interface) for comprehensive definitions and terminology of user interface elements. - -::: | Feature | Info | |---|---| -| **Keyboard shortcuts** | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. This includes the command palette (Command-P or Control-P), which has common shortcuts and build commands to optimize your developer workflow. For example, you can build modified models or continue the build from the last failure point. | +| [**Keyboard shortcuts**](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. This includes the command palette (Command-P or Control-P), which has common shortcuts and build commands to optimize your developer workflow. For example, you can build modified models or continue the build from the last failure point. | | **File state indicators** | Ability to see when changes or actions have been made to the file. The indicators **M, D, A,** and **•** appear to the right of your file or folder name and indicate the actions performed:

- Unsaved **(•)** — The IDE detects unsaved changes to your file/folder
- Modification **(M)** — The IDE detects a modification of existing files/folders
- Added **(A)** — The IDE detects added files
- Deleted **(D)** — The IDE detects deleted files. | **IDE version control** | The IDE version control section and git button allow you to apply the concept of [version control](/docs/collaborate/git/version-control-basics) to your project directly into the IDE.

- Create or change branches
- Commit or revert individual files by right-clicking the edited file
- [Resolve merge conflicts](/docs/collaborate/git/merge-conflicts)
- Execute git commands using the git button
- Link to the repo directly by clicking the branch name | | **Project documentation** | Generate and view your [project documentation](/docs/collaborate/build-and-view-your-docs) for your dbt project in real-time. You can inspect and verify what your project's documentation will look like before you deploy your changes to production. | From 3bcf8f0d1deeb08dae0d7b74a6d70edc47abe023 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 12:08:33 -0500 Subject: [PATCH 47/65] fold feedback --- website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md index def74ee53ee..e88fce916ef 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md @@ -51,7 +51,7 @@ To understand how to navigate the IDE and its user interface elements, refer to | Feature | Info | |---|---| -| [**Keyboard shortcuts**](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. This includes the command palette (Command-P or Control-P), which has common shortcuts and build commands to optimize your developer workflow. For example, you can build modified models or continue the build from the last failure point. | +| [**Keyboard shortcuts**](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. Use the shortcuts for common tasks like building modified models or resuming builds from the last failure. | | **File state indicators** | Ability to see when changes or actions have been made to the file. The indicators **M, D, A,** and **•** appear to the right of your file or folder name and indicate the actions performed:

- Unsaved **(•)** — The IDE detects unsaved changes to your file/folder
- Modification **(M)** — The IDE detects a modification of existing files/folders
- Added **(A)** — The IDE detects added files
- Deleted **(D)** — The IDE detects deleted files. | **IDE version control** | The IDE version control section and git button allow you to apply the concept of [version control](/docs/collaborate/git/version-control-basics) to your project directly into the IDE.

- Create or change branches
- Commit or revert individual files by right-clicking the edited file
- [Resolve merge conflicts](/docs/collaborate/git/merge-conflicts)
- Execute git commands using the git button
- Link to the repo directly by clicking the branch name | | **Project documentation** | Generate and view your [project documentation](/docs/collaborate/build-and-view-your-docs) for your dbt project in real-time. You can inspect and verify what your project's documentation will look like before you deploy your changes to production. | From 2c384e2bebba1f24f1a29a68e969cb4d4a5c6e01 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:14:06 -0500 Subject: [PATCH 48/65] update rn versions updating rn versions as the legacy sl was supported in dbt v1.5 and lower. --- .../docs/dbt-versions/release-notes/74-Dec-2023/legacy-sl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/legacy-sl.md b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/legacy-sl.md index 0eecfea623e..f6c18b2a053 100644 --- a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/legacy-sl.md +++ b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/legacy-sl.md @@ -23,11 +23,11 @@ The [re-released dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl), power ### Breaking changes and recommendations -- For users on dbt version 1.6 and lower with dbt Metrics and Snowflake proxy: +- For users on dbt version 1.5 and lower with dbt Metrics and Snowflake proxy: - **Impact**: Post-deprecation, queries using the proxy _will not_ run. - **Action required:** _Immediate_ migration is necessary. Refer to the [dbt Semantic Layer migration guide](/guides/sl-migration?step=1) -- For users on dbt version 1.6 and lower using dbt Metrics without Snowflake proxy: +- For users on dbt version 1.5 and lower using dbt Metrics without Snowflake proxy: - **Impact**: No immediate disruption, but the package will not receive updates or support after deprecation - **Recommendation**: Plan migration to the re-released Semantic Layer for compatibility with dbt version 1.6 and higher. From 9f24e90d5137459ed462061f4957339575681dc3 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Mon, 18 Dec 2023 13:24:02 -0500 Subject: [PATCH 49/65] update blog post --- ...023-08-01-announcing-materialized-views.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/website/blog/2023-08-01-announcing-materialized-views.md b/website/blog/2023-08-01-announcing-materialized-views.md index 3917e3f192c..e2773361d26 100644 --- a/website/blog/2023-08-01-announcing-materialized-views.md +++ b/website/blog/2023-08-01-announcing-materialized-views.md @@ -11,6 +11,11 @@ hide_table_of_contents: false date: 2023-08-03 is_featured: true --- +:::note +This blog post was updated on December 18, 2023 to cover the support of MVs on dbt-bigquery +and materialized tests. +::: + ## Introduction @@ -32,16 +37,15 @@ Materialized views are now an out of the box materialization in your dbt project - dbt-databricks - dbt-materialize* - dbt-trino* -- dbt-bigquery** +- dbt-bigquery (available on 1.7) *These adapters have supported materialized views in their adapter prior 1.6. -**dbt-bigquery support will be coming in 1.7. Just like you would materialize your sql model as  `table` or `view`  today, you can use `materialized_view` in your model configuration, dbt_project.yml, and resources.yml files. At release, python models will not be supported. -For Postgres/Redshift/Databricks +For Postgres/Redshift/Databricks/Bigquery ```sql {{ @@ -61,6 +65,7 @@ config( }} ``` + :::note We are only supporting dynamic tables on Snowflake, not Snowflake’s materialized views (for a comparison between Snowflake Dynamic Tables and Materialized Views, refer [docs](https://docs.snowflake.com/en/user-guide/dynamic-tables-comparison#dynamic-tables-compared-to-materialized-views). Dynamic tables are better suited for continuous transformations due to functionality like the ability to join, union, and aggregate on base tables, views , and other dynamic tables. Due to those features, they are also more aligned with what other data platforms are calling Materialized Views. For the sake of simplicity, when I refer to materialized views in this blog, I mean dynamic tables in Snowflake. ::: @@ -126,7 +131,7 @@ config( }} ``` -For Redshift: +For Redshift/BigQuery: ```sql {{ @@ -171,12 +176,12 @@ Now if you do need to more fully build out your development pipeline (making sur ### Testing -Now let’s dive into the second question: how do you test? In development and QA, this will look the same as any batch run tests. You can run `dbt build` or  `dbt test` and then have the tests run after execution as validation. But in production, what can you do to continually test? Your options are: +Now let’s dive into the second question: how do you test? In development and QA, this will look the same as any tests you might have while developing your batch pipelines. You can run `dbt build` or  `dbt test` and then have the tests run after execution as validation. But in production, what changes? -- Continue to do batch testing as we wait for [materialized tests](https://github.com/dbt-labs/dbt-core/issues/6914) -- Or overriding the –store-failures macro like what Materialize has created [here](https://materialize.com/blog/real-time-data-quality-tests-using-dbt-and-materialize/) for their adapter to materialize failed rows as a materialized view. This is not a great solution for the long term but if you have urgency to put this into production, it is an option. +I recommend that you update any tests applied to a materialized view/dynamic table with the +[store_failures_as](/reference/resource-configs/store_failures_as) configuration set to true and materialized as a view. This allows you to create a view that will provide all the rows that failed your test at time of query. Please note that this does not provide a historical look. You can also create alerting onto the view if it fails your expectations. -In order to promote materialized views into production, the process will look very much like it did with your incremental models. Using SlimCI, for new MVs, you can build them into your QA environment. For existing MVs without changes, we can skip and defer to the production objects. +In order to promote materialized views into production, the process will look very much like it did with your incremental models. Use [CI jobs](https://docs.getdbt.com/docs/deploy/ci-jobs) with defer so you can build them into your QA environment. For existing MVs without changes, we can skip and defer to the production objects. ### Production From 9ae628c58375a9bd539993d213b56f34098a1315 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Mon, 18 Dec 2023 13:24:25 -0500 Subject: [PATCH 50/65] update note at top --- website/blog/2023-08-01-announcing-materialized-views.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2023-08-01-announcing-materialized-views.md b/website/blog/2023-08-01-announcing-materialized-views.md index e2773361d26..b8998e4da11 100644 --- a/website/blog/2023-08-01-announcing-materialized-views.md +++ b/website/blog/2023-08-01-announcing-materialized-views.md @@ -13,7 +13,7 @@ is_featured: true --- :::note This blog post was updated on December 18, 2023 to cover the support of MVs on dbt-bigquery -and materialized tests. +and updates on how to test MVs. ::: From 48d2bf70eef224c25a2bb1ad86b243273d0aae2a Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 13:49:24 -0500 Subject: [PATCH 51/65] add rn content --- .../74-Dec-2023/dec-sl-releases.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md diff --git a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md new file mode 100644 index 00000000000..568d9fb3752 --- /dev/null +++ b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md @@ -0,0 +1,22 @@ +--- +title: "Updates and fixes: dbt Semantic Layer and MetricFlow updates for the month of December 2023." +description: "December 2023: Enhanced Tableau integration, BIGINT support, LookML to MetricFlow conversion, and deprecation of legacy features." +sidebar_label: "Update ad fixes: dbt Semantic Layer and MetricFlow." +sidebar_position: 08 +date: 2023-12-22 +--- + +The dbt Labs team continues to work on adding new features, fixing bugs, and increasing reliability for the dbt Semantic Layer and MetricFlow. Here are the updates and fixes for the month of December 2023. + +## Bug fixes + +- The dbt Semantic Layer integration with Tableau now supports using exclude in its user interface. Previously it wasn't supported. +- The dbt Semantic Layer can support `BIGINT` with over 18 digits. Previously it would return an error. +- The [dbt converter tool](https://github.com/dbt-labs/dbt-converter) can now convert data definitions from LookML to MetricFlow and help users upgrade. Previously this wasn't available. (converts from lookml to metricflow specs). ROXI TO CLARIFY WITH NICK TO DETERMINE IF WE WANT TO TALK ABOUT THIS NOW OR LATER ON WHEN IT HAS MORE FEATURES. + +## Improvements + +- dbt Labs deprecated [dbt Metrics and the legacy dbt Semantic Layer](/docs/dbt-versions/release-notes/Dec-2023/legacy-sl), both supported on dbt version 1.5 or lower. This change came into effect on December 15th, 2023. + +## New features +- Test From bc11f6c4a451d1d8784f882ce0e7d0d46ea3419e Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 13:51:46 -0500 Subject: [PATCH 52/65] remove --- .../74-Dec-2023/dec-sl-releases.md | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md diff --git a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md deleted file mode 100644 index 568d9fb3752..00000000000 --- a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Updates and fixes: dbt Semantic Layer and MetricFlow updates for the month of December 2023." -description: "December 2023: Enhanced Tableau integration, BIGINT support, LookML to MetricFlow conversion, and deprecation of legacy features." -sidebar_label: "Update ad fixes: dbt Semantic Layer and MetricFlow." -sidebar_position: 08 -date: 2023-12-22 ---- - -The dbt Labs team continues to work on adding new features, fixing bugs, and increasing reliability for the dbt Semantic Layer and MetricFlow. Here are the updates and fixes for the month of December 2023. - -## Bug fixes - -- The dbt Semantic Layer integration with Tableau now supports using exclude in its user interface. Previously it wasn't supported. -- The dbt Semantic Layer can support `BIGINT` with over 18 digits. Previously it would return an error. -- The [dbt converter tool](https://github.com/dbt-labs/dbt-converter) can now convert data definitions from LookML to MetricFlow and help users upgrade. Previously this wasn't available. (converts from lookml to metricflow specs). ROXI TO CLARIFY WITH NICK TO DETERMINE IF WE WANT TO TALK ABOUT THIS NOW OR LATER ON WHEN IT HAS MORE FEATURES. - -## Improvements - -- dbt Labs deprecated [dbt Metrics and the legacy dbt Semantic Layer](/docs/dbt-versions/release-notes/Dec-2023/legacy-sl), both supported on dbt version 1.5 or lower. This change came into effect on December 15th, 2023. - -## New features -- Test From 519a25ff340732f9c49bfaf70a3d9f27e95efd4d Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 13:52:38 -0500 Subject: [PATCH 53/65] Revert "remove" This reverts commit bc11f6c4a451d1d8784f882ce0e7d0d46ea3419e. --- .../74-Dec-2023/dec-sl-releases.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md diff --git a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md new file mode 100644 index 00000000000..568d9fb3752 --- /dev/null +++ b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md @@ -0,0 +1,22 @@ +--- +title: "Updates and fixes: dbt Semantic Layer and MetricFlow updates for the month of December 2023." +description: "December 2023: Enhanced Tableau integration, BIGINT support, LookML to MetricFlow conversion, and deprecation of legacy features." +sidebar_label: "Update ad fixes: dbt Semantic Layer and MetricFlow." +sidebar_position: 08 +date: 2023-12-22 +--- + +The dbt Labs team continues to work on adding new features, fixing bugs, and increasing reliability for the dbt Semantic Layer and MetricFlow. Here are the updates and fixes for the month of December 2023. + +## Bug fixes + +- The dbt Semantic Layer integration with Tableau now supports using exclude in its user interface. Previously it wasn't supported. +- The dbt Semantic Layer can support `BIGINT` with over 18 digits. Previously it would return an error. +- The [dbt converter tool](https://github.com/dbt-labs/dbt-converter) can now convert data definitions from LookML to MetricFlow and help users upgrade. Previously this wasn't available. (converts from lookml to metricflow specs). ROXI TO CLARIFY WITH NICK TO DETERMINE IF WE WANT TO TALK ABOUT THIS NOW OR LATER ON WHEN IT HAS MORE FEATURES. + +## Improvements + +- dbt Labs deprecated [dbt Metrics and the legacy dbt Semantic Layer](/docs/dbt-versions/release-notes/Dec-2023/legacy-sl), both supported on dbt version 1.5 or lower. This change came into effect on December 15th, 2023. + +## New features +- Test From a823147a03f262597b6c7429bad4a2def64e0ea0 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 18 Dec 2023 13:54:13 -0500 Subject: [PATCH 54/65] remove --- .../74-Dec-2023/dec-sl-releases.md | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md diff --git a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md b/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md deleted file mode 100644 index 568d9fb3752..00000000000 --- a/website/docs/docs/dbt-versions/release-notes/74-Dec-2023/dec-sl-releases.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Updates and fixes: dbt Semantic Layer and MetricFlow updates for the month of December 2023." -description: "December 2023: Enhanced Tableau integration, BIGINT support, LookML to MetricFlow conversion, and deprecation of legacy features." -sidebar_label: "Update ad fixes: dbt Semantic Layer and MetricFlow." -sidebar_position: 08 -date: 2023-12-22 ---- - -The dbt Labs team continues to work on adding new features, fixing bugs, and increasing reliability for the dbt Semantic Layer and MetricFlow. Here are the updates and fixes for the month of December 2023. - -## Bug fixes - -- The dbt Semantic Layer integration with Tableau now supports using exclude in its user interface. Previously it wasn't supported. -- The dbt Semantic Layer can support `BIGINT` with over 18 digits. Previously it would return an error. -- The [dbt converter tool](https://github.com/dbt-labs/dbt-converter) can now convert data definitions from LookML to MetricFlow and help users upgrade. Previously this wasn't available. (converts from lookml to metricflow specs). ROXI TO CLARIFY WITH NICK TO DETERMINE IF WE WANT TO TALK ABOUT THIS NOW OR LATER ON WHEN IT HAS MORE FEATURES. - -## Improvements - -- dbt Labs deprecated [dbt Metrics and the legacy dbt Semantic Layer](/docs/dbt-versions/release-notes/Dec-2023/legacy-sl), both supported on dbt version 1.5 or lower. This change came into effect on December 15th, 2023. - -## New features -- Test From c6a95cd52babb4ddb95d378c4f43aaa3728ec7f4 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Mon, 18 Dec 2023 14:39:36 -0500 Subject: [PATCH 55/65] update the bq config --- .../2023-08-01-announcing-materialized-views.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/website/blog/2023-08-01-announcing-materialized-views.md b/website/blog/2023-08-01-announcing-materialized-views.md index b8998e4da11..39a432c26e5 100644 --- a/website/blog/2023-08-01-announcing-materialized-views.md +++ b/website/blog/2023-08-01-announcing-materialized-views.md @@ -131,7 +131,7 @@ config( }} ``` -For Redshift/BigQuery: +For Redshift: ```sql {{ @@ -142,6 +142,18 @@ config( ) }} ``` +For Bigquery +```sql +{{ +config( + materialized = 'materialized_view', + on_configuration_change = 'apply', + auto_refresh = True, + refresh_interval_minutes = 30 + max_staleness = 60, +) +}} +``` For Databricks: From b6f8ea38173155c396400c5ed52402c8ec501615 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Mon, 18 Dec 2023 14:47:33 -0500 Subject: [PATCH 56/65] update to include links --- .../2023-08-01-announcing-materialized-views.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/blog/2023-08-01-announcing-materialized-views.md b/website/blog/2023-08-01-announcing-materialized-views.md index 39a432c26e5..75b11c5a37f 100644 --- a/website/blog/2023-08-01-announcing-materialized-views.md +++ b/website/blog/2023-08-01-announcing-materialized-views.md @@ -31,13 +31,13 @@ Today we are announcing that we now support Materialized Views in dbt. So, what Materialized views are now an out of the box materialization in your dbt project once you upgrade to the latest version of dbt v1.6 on these following adapters: -- dbt-postgres -- dbt-redshift -- dbt-snowflake -- dbt-databricks -- dbt-materialize* -- dbt-trino* -- dbt-bigquery (available on 1.7) +- [dbt-postgres](/reference/resource-configs/postgres-configs#materialized-views) +- [dbt-redshift](reference/resource-configs/redshift-configs#materialized-views) +- [dbt-snowflake](reference/resource-configs/snowflake-configs#dynamic-tables) +- [dbt-databricks](/reference/resource-configs/databricks-configs#materialized-views-and-streaming-tables) +- [dbt-materialize*](/reference/resource-configs/materialize-configs#incremental-models-materialized-views) +- [dbt-trino*](/reference/resource-configs/trino-configs#materialized-view) +- [dbt-bigquery (available on 1.7)](/reference/resource-configs/bigquery-configs#materialized-views) *These adapters have supported materialized views in their adapter prior 1.6. From 593baaeea0c0f2bd743fd23821c97f6f6b424678 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Mon, 18 Dec 2023 14:48:16 -0500 Subject: [PATCH 57/65] fix the enable_refresh --- website/blog/2023-08-01-announcing-materialized-views.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2023-08-01-announcing-materialized-views.md b/website/blog/2023-08-01-announcing-materialized-views.md index 75b11c5a37f..eb9716e73a5 100644 --- a/website/blog/2023-08-01-announcing-materialized-views.md +++ b/website/blog/2023-08-01-announcing-materialized-views.md @@ -148,7 +148,7 @@ For Bigquery config( materialized = 'materialized_view', on_configuration_change = 'apply', - auto_refresh = True, + enable_refresh = True, refresh_interval_minutes = 30 max_staleness = 60, ) From 13c08c2bcec6b52af18539ec29e5b993c37fcb89 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:03:05 -0500 Subject: [PATCH 58/65] Update dbt-tips.md quick typo fix --- website/docs/docs/build/dbt-tips.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/dbt-tips.md b/website/docs/docs/build/dbt-tips.md index 681e6b93dfe..d4085c163a1 100644 --- a/website/docs/docs/build/dbt-tips.md +++ b/website/docs/docs/build/dbt-tips.md @@ -10,7 +10,7 @@ Use this page for valuable insights and practical advice to enhance your dbt exp The following tips are organized into the following categories: - [Package tips](#package-tips) to help you streamline your workflow. -- [Advanced tips and techniques](#advanced-tips-adn-techniques) to help you get the most out of dbt. +- [Advanced tips and techniques](#advanced-tips-and-techniques) to help you get the most out of dbt. If you're developing with the dbt Cloud IDE, you can refer to the [keyboard shortcuts](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) page to help make development more productive and easier for everyone. From 2a41e89e07b97ff5ae5aedb9409bee80d17105e6 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:05:43 -0500 Subject: [PATCH 59/65] Update develop-in-the-cloud.md remove ink from the ide feature paragraph as it's not needed and is currently linking to the ide ui page, which is already linked below. --- website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md index e88fce916ef..57146ec513a 100644 --- a/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md +++ b/website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md @@ -44,7 +44,7 @@ To improve your experience using dbt Cloud, we suggest that you turn off ad bloc ## dbt Cloud IDE features -The dbt Cloud IDE comes with [features](/docs/cloud/dbt-cloud-ide/ide-user-interface) that make it easier for you to develop, build, compile, run, and test data models. +The dbt Cloud IDE comes with features that make it easier for you to develop, build, compile, run, and test data models. To understand how to navigate the IDE and its user interface elements, refer to the [IDE user interface](/docs/cloud/dbt-cloud-ide/ide-user-interface) page. From 03bb342130283d26132234f86e9f516c1a292264 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:25:51 -0500 Subject: [PATCH 60/65] Update on_configuration_change.md --- .../on_configuration_change.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/docs/reference/resource-configs/on_configuration_change.md b/website/docs/reference/resource-configs/on_configuration_change.md index 404008ab9b5..68cfc7887b9 100644 --- a/website/docs/reference/resource-configs/on_configuration_change.md +++ b/website/docs/reference/resource-configs/on_configuration_change.md @@ -5,15 +5,15 @@ datatype: "string" --- :::info -This functionality is currently only supported for [materialized views](/docs/build/materializations#materialized-view) on a subset of adapters +This functionality is currently only supported for [materialized views](/docs/build/materializations#materialized-view) on a subset of adapters. ::: The `on_configuration_change` config has three settings: -- `apply` (default) — attempt to update the existing database object if possible, avoiding a complete rebuild - - *Note:* if any individual configuration change requires a full refresh, a full refresh be performed in lieu of individual alter statements -- `continue` — allow runs to continue while also providing a warning that the object was left untouched - - *Note:* this could result in downstream failures as those models may depend on these unimplemented changes -- `fail` — force the entire run to fail if a change is detected +- `apply` (default) — Attempt to update the existing database object if possible, avoiding a complete rebuild. + - *Note:* If any individual configuration change requires a full refresh, a full refresh be performed in lieu of individual alter statements. +- `continue` — Allow runs to continue while also providing a warning that the object was left untouched. + - *Note:* This could result in downstream failures as those models may depend on these unimplemented changes. +- `fail` — Force the entire run to fail if a change is detected. Materializations are implemented following this "drop through" life cycle: -1. If a model does not exist with the provided path, create the new model -2. If a model exists, but has a different type, drop the existing model and create the new model -3. If `--full-refresh` is supplied, replace the existing model regardless of configuration changes and the `on_configuration_change` setting -4. If there are no configuration changes, perform the default action for that type (e.g. apply refresh for a materialized view) -5. Determine whether to apply the configuration changes according to the `on_configuration_change` setting +1. If a model does not exist with the provided path, create the new model. +2. If a model exists, but has a different type, drop the existing model and create the new model. +3. If `--full-refresh` is supplied, replace the existing model regardless of configuration changes and the `on_configuration_change` setting. +4. If there are no configuration changes, perform the default action for that type (e.g. apply refresh for a materialized view). +5. Determine whether to apply the configuration changes according to the `on_configuration_change` setting. From 69c859ff903f12c6981e1e7f547b1c68d0efdef0 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 18 Dec 2023 13:29:15 -0700 Subject: [PATCH 61/65] Differentiate between expressions that print and statements that don't (#4546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Preview](https://docs-getdbt-com-git-dbeatty-jinja-statements-dbt-labs.vercel.app/docs/build/jinja-macros#jinja) ## What are you changing in this pull request and why? Instigated by https://github.com/dbt-labs/dbt-core/issues/9113#issuecomment-1829883237 We want to briefly explain the differences between expressions that print out and statements that don't. At the same time, we don't want to fully replicate all the [Jinja documentation](https://jinja.palletsprojects.com/en/3.0.x/templates/). Here's a quick table to explain the behavioral differences between the types of delimiters ("curlies"): | Name | Delimiter | Executes | Prints | |------------|-------------|:--------:|:------:| | Expression | `{{ ... }}` | ✅ | ✅ | | Statement | `{% ... %}` | ✅ | ❌ | | Comment | `{# ... #}` | ❌ | ❌ | The Jinja docs for the different [types of delimiters](https://jinja.palletsprojects.com/en/3.0.x/templates/#synopsis:~:text=The%20default%20Jinja%20delimiters%20are%20configured%20as%20follows) has the advantage of being brief, but lacks clarity especially as it relates to whether statements print out or not (they don't). Since the [“do” aka expression-statement](https://jinja.palletsprojects.com/en/3.1.x/templates/#expression-statement) is an [optional extension](https://jinja.palletsprojects.com/en/3.0.x/extensions/#expression-statement) in Jinja, it isn't documented in list of [control structures](https://jinja.palletsprojects.com/en/3.0.x/templates/#list-of-control-structures). ## 🎩 image ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [x] I have checked that the preview renders correctly - [x] I have checked that the new links work correctly --- website/docs/docs/build/jinja-macros.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/build/jinja-macros.md b/website/docs/docs/build/jinja-macros.md index 074e648d410..ea60c7d48e0 100644 --- a/website/docs/docs/build/jinja-macros.md +++ b/website/docs/docs/build/jinja-macros.md @@ -71,8 +71,8 @@ group by 1 You can recognize Jinja based on the delimiters the language uses, which we refer to as "curlies": - **Expressions `{{ ... }}`**: Expressions are used when you want to output a string. You can use expressions to reference [variables](/reference/dbt-jinja-functions/var) and call [macros](/docs/build/jinja-macros#macros). -- **Statements `{% ... %}`**: Statements are used for control flow, for example, to set up `for` loops and `if` statements, or to define macros. -- **Comments `{# ... #}`**: Jinja comments are used to prevent the text within the comment from compiling. +- **Statements `{% ... %}`**: Statements don't output a string. They are used for control flow, for example, to set up `for` loops and `if` statements, to [set](https://jinja.palletsprojects.com/en/3.1.x/templates/#assignments) or [modify](https://jinja.palletsprojects.com/en/3.1.x/templates/#expression-statement) variables, or to define macros. +- **Comments `{# ... #}`**: Jinja comments are used to prevent the text within the comment from executing or outputing a string. When used in a dbt model, your Jinja needs to compile to a valid query. To check what SQL your Jinja compiles to: * **Using dbt Cloud:** Click the compile button to see the compiled SQL in the Compiled SQL pane From 7dedf0f2fdec265dca29287120e050643c786263 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Mon, 18 Dec 2023 12:32:51 -0800 Subject: [PATCH 62/65] Update sl-partner-integration-guide.md Updating this per our recomendation --- website/docs/guides/sl-partner-integration-guide.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/website/docs/guides/sl-partner-integration-guide.md b/website/docs/guides/sl-partner-integration-guide.md index 04f58f525bd..76a341643c3 100644 --- a/website/docs/guides/sl-partner-integration-guide.md +++ b/website/docs/guides/sl-partner-integration-guide.md @@ -39,10 +39,15 @@ We recommend you provide users with separate input fields with these components ### Exposing metadata to dbt Labs -When building an integration, we recommend you expose certain metadata in the request for analytics purposes. Among other items, it is helpful to have the following: +When building an integration, we recommend you expose certain metadata in the request for analytics and troubleshooting purpose. -- Your application's name (such as 'Tableau') -- The email of the person querying your application +Please send us the following header with every query: + +'X-dbt-partner-source': 'Your-Application' + +Additionally, it would be helpful if you also included: + +- The email and username of the person generating the query from your application - The version of dbt they are on. From d303d7662cf9337e47a825fb00bfc79e7b7f37c1 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Mon, 18 Dec 2023 12:41:23 -0800 Subject: [PATCH 63/65] Update sl-partner-integration-guide.md --- website/docs/guides/sl-partner-integration-guide.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/docs/guides/sl-partner-integration-guide.md b/website/docs/guides/sl-partner-integration-guide.md index 76a341643c3..61d558f504d 100644 --- a/website/docs/guides/sl-partner-integration-guide.md +++ b/website/docs/guides/sl-partner-integration-guide.md @@ -43,12 +43,10 @@ When building an integration, we recommend you expose certain metadata in the re Please send us the following header with every query: -'X-dbt-partner-source': 'Your-Application' +`'X-dbt-partner-source': 'Your-Application-Name'` -Additionally, it would be helpful if you also included: +Additionally, it would be helpful if you also included the email and username of the person generating the query from your application. -- The email and username of the person generating the query from your application -- The version of dbt they are on. ## Use best practices when exposing metrics From cf661bcc6e6b6b829ec208c8dc389bc50f10862b Mon Sep 17 00:00:00 2001 From: rpourzand Date: Mon, 18 Dec 2023 15:29:05 -0800 Subject: [PATCH 64/65] Update sl-jdbc.md updating for dimension only queries --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 30 ++++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 45b012c67c6..345be39635e 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -165,17 +165,17 @@ select * from {{ ## Querying the API for metric values -To query metric values, here are the following parameters that are available: +To query metric values, here are the following parameters that are available. Your query must have _either_ a `metric` **or** a `group_by` parameter to be valid. -| Parameter | Description | Example | Type | -| --------- | -----------| ------------ | -------------------- | -| `metrics` | The metric name as defined in your dbt metric configuration | `metrics=['revenue']` | Required | -| `group_by` | Dimension names or entities to group by. We require a reference to the entity of the dimension (other than for the primary time dimension), which is pre-appended to the front of the dimension name with a double underscore. | `group_by=['user__country', 'metric_time']` | Optional | -| `grain` | A parameter specific to any time dimension and changes the grain of the data from the default for the metric. | `group_by=[Dimension('metric_time')`
`grain('week\|day\|month\|quarter\|year')]` | Optional | -| `where` | A where clause that allows you to filter on dimensions and entities using parameters. This takes a filter list OR string. Inputs come with `Dimension`, and `Entity` objects. Granularity is required if the `Dimension` is a time dimension | `"{{ where=Dimension('customer__country') }} = 'US')"` | Optional | -| `limit` | Limit the data returned | `limit=10` | Optional | -|`order` | Order the data returned by a particular field | `order_by=['order_gross_profit']`, use `-` for descending, or full object notation if the object is operated on: `order_by=[Metric('order_gross_profit').descending(True)`] | Optional | -| `compile` | If true, returns generated SQL for the data platform but does not execute | `compile=True` | Optional | +| Parameter | Description | Example | +| --------- | -----------| ------------ | +| `metrics` | The metric name as defined in your dbt metric configuration | `metrics=['revenue']` | +| `group_by` | Dimension names or entities to group by. We require a reference to the entity of the dimension (other than for the primary time dimension), which is pre-appended to the front of the dimension name with a double underscore. | `group_by=['user__country', 'metric_time']` | +| `grain` | A parameter specific to any time dimension and changes the grain of the data from the default for the metric. | `group_by=[Dimension('metric_time')`
`grain('week\|day\|month\|quarter\|year')]` | +| `where` | A where clause that allows you to filter on dimensions and entities using parameters. This takes a filter list OR string. Inputs come with `Dimension`, and `Entity` objects. Granularity is required if the `Dimension` is a time dimension | `"{{ where=Dimension('customer__country') }} = 'US')"` | +| `limit` | Limit the data returned | `limit=10` | +|`order` | Order the data returned by a particular field | `order_by=['order_gross_profit']`, use `-` for descending, or full object notation if the object is operated on: `order_by=[Metric('order_gross_profit').descending(True)`] | +| `compile` | If true, returns generated SQL for the data platform but does not execute | `compile=True` | @@ -248,6 +248,16 @@ select * from {{ }} ``` +### Query only a dimension + +In this case, you'll get the full list of dimension values for the chosen dimension. + +```bash +select * from {{ + semantic_layer.query(group_by=['customer__customer_type']) + }} +``` + ### Query with where filters Where filters in API allow for a filter list or string. We recommend using the filter list for production applications as this format will realize all benefits from the where possible. From 9767b8d4124249e8d7395118e4d1d9c8e83c1d0f Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Tue, 19 Dec 2023 09:21:05 +0400 Subject: [PATCH 65/65] Update metrics-overview.md --- website/docs/docs/build/metrics-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/metrics-overview.md b/website/docs/docs/build/metrics-overview.md index 81af149a7d9..b6ccc1c3b9c 100644 --- a/website/docs/docs/build/metrics-overview.md +++ b/website/docs/docs/build/metrics-overview.md @@ -50,7 +50,7 @@ This page explains the different supported metric types you can add to your dbt ### Cumulative metrics -[Cumulative metrics](/docs/build/cumulative) aggregate a measure over a given window. If no window is specified, the window would accumulate the measure over all time. **Note**m, you will need to create the [time spine model](/docs/build/metricflow-time-spine) before you add cumulative metrics. +[Cumulative metrics](/docs/build/cumulative) aggregate a measure over a given window. If no window is specified, the window would accumulate the measure over all time. **Note**, you will need to create the [time spine model](/docs/build/metricflow-time-spine) before you add cumulative metrics. ```yaml # Cumulative metrics aggregate a measure over a given window. The window is considered infinite if no window parameter is passed (accumulate the measure over all time)