From d60a437f3ff4d4ad25ca1972285a7c10a3d673fe Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 22 May 2024 15:15:07 +0100 Subject: [PATCH 01/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 27 ++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index efd108b9e13..16354d27f5f 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -17,7 +17,32 @@ Starting from dbt v1.5 and higher, you can specify your dbt Cloud project ID in -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. +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. + +## Naming convention + +It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly: + +- Use dashes (`-`) for resource types in your `dbt_project.yml` file. As an example, if you're defining `saved-queries`, use dashes to separate words: + + ```yaml + saved-queries: + my_saved_query: + config: + +cache: + enabled: true + ``` + +- If you're configuring options outside the `dbt_project.yml` file, use underscore (`_`): + + ```yaml + saved_queries: + - name: SAVED_QUERY_NAME + config: + group: GROUP_NAME + ``` + +## Example The following example is a list of all available configurations in the `dbt_project.yml` file: From e150dec5f617c3724e5ba512e069525fa454139c Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 22 May 2024 15:19:50 +0100 Subject: [PATCH 02/22] Update semantic-models.md --- website/docs/docs/build/semantic-models.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/docs/build/semantic-models.md b/website/docs/docs/build/semantic-models.md index 95969b63437..0ed9be53f1b 100644 --- a/website/docs/docs/build/semantic-models.md +++ b/website/docs/docs/build/semantic-models.md @@ -144,6 +144,8 @@ Semantic models support [`meta`](/reference/resource-configs/meta), [`group`](/r some_key: some_value ``` +For more info on `dbt_project.yml` and config naming conventions, check out [naming convention](/reference/dbt_project.yml). + ### Name From 455cb6a5d5d55f2c636b00b96336a97a17af8dad Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 22 May 2024 15:20:12 +0100 Subject: [PATCH 03/22] Update saved-queries.md --- website/docs/docs/build/saved-queries.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md index 69ed0dea8c8..30747bb196d 100644 --- a/website/docs/docs/build/saved-queries.md +++ b/website/docs/docs/build/saved-queries.md @@ -119,6 +119,8 @@ saved-queries: ``` +For more info on `dbt_project.yml` and config naming conventions, check out [naming convention](/reference/dbt_project.yml). + #### Where clause Use the following syntax to reference entities, dimensions, time dimensions, or metrics in filters and refer to [Metrics as dimensions](/docs/build/ref-metrics-in-filters) for details on how to use metrics as dimensions with metric filters: From 60345efa09091060262ea93cb14de32ec97d0191 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 22 May 2024 15:47:04 +0100 Subject: [PATCH 04/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 47 ++++++++++++----------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 16354d27f5f..c5047d6ee0c 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -19,29 +19,6 @@ Starting from dbt v1.5 and higher, you can specify your dbt Cloud project ID in 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. -## Naming convention - -It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly: - -- Use dashes (`-`) for resource types in your `dbt_project.yml` file. As an example, if you're defining `saved-queries`, use dashes to separate words: - - ```yaml - saved-queries: - my_saved_query: - config: - +cache: - enabled: true - ``` - -- If you're configuring options outside the `dbt_project.yml` file, use underscore (`_`): - - ```yaml - saved_queries: - - name: SAVED_QUERY_NAME - config: - group: GROUP_NAME - ``` - ## Example The following example is a list of all available configurations in the `dbt_project.yml` file: @@ -267,3 +244,27 @@ vars: + + +## Naming convention + +It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly: + +- Use dashes (`-`) for resource types in your `dbt_project.yml` file. As an example, if you're defining `saved-queries`, use dashes to separate words: + + ```yaml + saved-queries: + my_saved_query: + config: + +cache: + enabled: true + ``` + +- If you're configuring options outside the `dbt_project.yml` file, use underscore (`_`): + + ```yaml + saved_queries: + - name: SAVED_QUERY_NAME + config: + group: GROUP_NAME + ``` From bea97c7b8a8678d07e8ce5f781ebda232d34b93d Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 23 May 2024 10:02:30 +0100 Subject: [PATCH 05/22] add file names --- website/docs/reference/dbt_project.yml.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index c5047d6ee0c..9cc32bba13f 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -250,21 +250,27 @@ vars: It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly: -- Use dashes (`-`) for resource types in your `dbt_project.yml` file. As an example, if you're defining `saved-queries`, use dashes to separate words: +- Use dashes (`-`) for resource types in your `dbt_project.yml` file: + + ```yaml - saved-queries: + [saved-queries](/docs/build/saved-queries#project-level-saved-queries): my_saved_query: config: +cache: enabled: true ``` + -- If you're configuring options outside the `dbt_project.yml` file, use underscore (`_`): +- Use underscore (`_`) if you're configuring options outside the `dbt_project.yml` file: + + ```yaml - saved_queries: + [saved_queries]/docs/build/saved-queries#configure-saved-query): - name: SAVED_QUERY_NAME config: group: GROUP_NAME ``` + From 4c02313e663226aa21e26691cb8f4af002762383 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 23 May 2024 10:10:30 +0100 Subject: [PATCH 06/22] link to naming conventions --- website/docs/reference/configs-and-properties.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index f1a5e140b78..1413ea9216a 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -5,7 +5,8 @@ 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 `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 +- You can select resources based on their config values using the `config:` selection method, but not the values of non-config properties. +- There are slightly different naming conventions for properties and configs depending on the file type. Refer to [naming convention](/docs/reference/dbt_project.yml#naming-convention) for more details. A rule of thumb: properties declare things _about_ your project resources; configs go the extra step of telling dbt _how_ to build those resources in your warehouse. This is generally true, but not always, so it's always good to check! From 2fde006ea965de53817262847e970f218f4d3218 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 23 May 2024 10:41:54 +0100 Subject: [PATCH 07/22] fix link --- website/docs/reference/configs-and-properties.md | 2 +- website/docs/reference/dbt_project.yml.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/website/docs/reference/configs-and-properties.md b/website/docs/reference/configs-and-properties.md index 1413ea9216a..58ab43af136 100644 --- a/website/docs/reference/configs-and-properties.md +++ b/website/docs/reference/configs-and-properties.md @@ -6,7 +6,7 @@ Resources in your project—models, snapshots, seeds, tests, and the rest—can - 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. -- There are slightly different naming conventions for properties and configs depending on the file type. Refer to [naming convention](/docs/reference/dbt_project.yml#naming-convention) for more details. +- There are slightly different naming conventions for properties and configs depending on the file type. Refer to [naming convention](/reference/dbt_project.yml#naming-convention) for more details. A rule of thumb: properties declare things _about_ your project resources; configs go the extra step of telling dbt _how_ to build those resources in your warehouse. This is generally true, but not always, so it's always good to check! diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 9cc32bba13f..88140a301e9 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -245,7 +245,6 @@ vars: - ## Naming convention It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly: From a3d522ebfc3ecef0d5173094b59385474b708785 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 11:06:56 +0100 Subject: [PATCH 08/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 88140a301e9..bdd9ae489b7 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -247,29 +247,29 @@ vars: ## Naming convention -It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly: +It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly. This is especially true for resource types with more than one word: -- Use dashes (`-`) for resource types in your `dbt_project.yml` file: +- Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file: - - - ```yaml - [saved-queries](/docs/build/saved-queries#project-level-saved-queries): - my_saved_query: - config: - +cache: - enabled: true - ``` - - -- Use underscore (`_`) if you're configuring options outside the `dbt_project.yml` file: - - - - ```yaml - [saved_queries]/docs/build/saved-queries#configure-saved-query): - - name: SAVED_QUERY_NAME - config: - group: GROUP_NAME - ``` - + + + ```yaml + [saved-queries](/docs/build/saved-queries#project-level-saved-queries): # This resource type in the dbt_project.yml uses dashes + my_saved_query: + config: + +cache: + enabled: true + ``` + + +- Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: + + + + ```yaml + [saved_queries](/docs/build/saved-queries#configure-saved-query): # This example uses underscores + - name: SAVED_QUERY_NAME + config: + group: GROUP_NAME + ``` + From 46b32bf505c25bcc4bf5850f9374be32eb54f9bf Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 13:11:33 +0100 Subject: [PATCH 09/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index bdd9ae489b7..2f8cd9b37b3 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -254,7 +254,7 @@ It's important to follow the correct naming conventions for the YAML configs in ```yaml - [saved-queries](/docs/build/saved-queries#project-level-saved-queries): # This resource type in the dbt_project.yml uses dashes + [saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## This resource type in the dbt_project.yml uses dashes my_saved_query: config: +cache: @@ -267,7 +267,7 @@ It's important to follow the correct naming conventions for the YAML configs in ```yaml - [saved_queries](/docs/build/saved-queries#configure-saved-query): # This example uses underscores + [saved_queries](/docs/build/saved-queries#configure-saved-query): ## This example uses underscores - name: SAVED_QUERY_NAME config: group: GROUP_NAME From 12b2e38a5143e7bc4b54503a90833e6756f1174c Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 13:23:50 +0100 Subject: [PATCH 10/22] Update website/docs/reference/dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 2f8cd9b37b3..46b5ef97b56 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -254,7 +254,7 @@ It's important to follow the correct naming conventions for the YAML configs in ```yaml - [saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## This resource type in the dbt_project.yml uses dashes + [saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## Uses dashes in the dbt_project.yml file. my_saved_query: config: +cache: From 5260003e7c4690dba0ebfc2163bec4fd099b9f4c Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 13:24:14 +0100 Subject: [PATCH 11/22] Update website/docs/reference/dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 46b5ef97b56..707abe6b5af 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -254,7 +254,7 @@ It's important to follow the correct naming conventions for the YAML configs in ```yaml - [saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## Uses dashes in the dbt_project.yml file. + [saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## Use dashes in the dbt_project.yml file. my_saved_query: config: +cache: From fe13bb449c70c2a502780451609372c185f20145 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 13:25:10 +0100 Subject: [PATCH 12/22] Update website/docs/reference/dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 707abe6b5af..c6f308c76a5 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -267,7 +267,7 @@ It's important to follow the correct naming conventions for the YAML configs in ```yaml - [saved_queries](/docs/build/saved-queries#configure-saved-query): ## This example uses underscores + [saved_queries](/docs/build/saved-queries#configure-saved-query): ## Use underscores everywhere outside the dbt_project.yml file. - name: SAVED_QUERY_NAME config: group: GROUP_NAME From ffda330f2cedb8f9e0aae50c0f534faec4a8f452 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 15:35:12 +0100 Subject: [PATCH 13/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index c6f308c76a5..1bb17411e65 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -249,27 +249,29 @@ vars: It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly. This is especially true for resource types with more than one word: -- Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file: +Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file: - + - ```yaml - [saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## Use dashes in the dbt_project.yml file. +```yaml +[saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## Use dashes in the dbt_project.yml file. my_saved_query: config: +cache: enabled: true - ``` - +``` + + -- Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: +Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: - - - ```yaml - [saved_queries](/docs/build/saved-queries#configure-saved-query): ## Use underscores everywhere outside the dbt_project.yml file. + + +```yaml +[saved_queries](/docs/build/saved-queries#configure-saved-query): ## Use underscores everywhere outside the dbt_project.yml file. - name: SAVED_QUERY_NAME config: group: GROUP_NAME - ``` - +``` + + From ef7e6c63107c25eb724f14ca220ad69334d69795 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 15:35:47 +0100 Subject: [PATCH 14/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 1bb17411e65..1eea6e90885 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -254,7 +254,7 @@ Use dashes (`-`) when configuring resource types with multiple words in your `db ```yaml -[saved-queries](/docs/build/saved-queries#project-level-saved-queries): ## Use dashes in the dbt_project.yml file. +[saved-queries](/docs/build/saved-queries#project-level-saved-queries): # Use dashes in the dbt_project.yml file. my_saved_query: config: +cache: @@ -268,7 +268,7 @@ Use underscore (`_`) when configuring resource types with multiple words outside ```yaml -[saved_queries](/docs/build/saved-queries#configure-saved-query): ## Use underscores everywhere outside the dbt_project.yml file. +[saved_queries](/docs/build/saved-queries#configure-saved-query): # Use underscores everywhere outside the dbt_project.yml file. - name: SAVED_QUERY_NAME config: group: GROUP_NAME From 07c422083b58c52ce64f6e526f2ad7e24f9ec928 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 18:23:12 +0100 Subject: [PATCH 15/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 1eea6e90885..1a303e63dbf 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -253,7 +253,7 @@ Use dashes (`-`) when configuring resource types with multiple words in your `db -```yaml +```yml [saved-queries](/docs/build/saved-queries#project-level-saved-queries): # Use dashes in the dbt_project.yml file. my_saved_query: config: @@ -267,7 +267,8 @@ Use underscore (`_`) when configuring resource types with multiple words outside -```yaml +```yml + [saved_queries](/docs/build/saved-queries#configure-saved-query): # Use underscores everywhere outside the dbt_project.yml file. - name: SAVED_QUERY_NAME config: From 3ae0edfef774011fc504980c8a94eb85b6b97370 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 23 May 2024 18:42:52 +0100 Subject: [PATCH 16/22] Update dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 1a303e63dbf..3700961e19d 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -251,7 +251,7 @@ It's important to follow the correct naming conventions for the YAML configs in Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file: - + ```yml [saved-queries](/docs/build/saved-queries#project-level-saved-queries): # Use dashes in the dbt_project.yml file. @@ -260,19 +260,16 @@ Use dashes (`-`) when configuring resource types with multiple words in your `db +cache: enabled: true ``` - Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: - + ```yml - [saved_queries](/docs/build/saved-queries#configure-saved-query): # Use underscores everywhere outside the dbt_project.yml file. - name: SAVED_QUERY_NAME config: group: GROUP_NAME ``` - From b4ad1a730eb02e77afdcaea120d472ee3c033f23 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 May 2024 11:37:07 +0100 Subject: [PATCH 17/22] fix render --- website/docs/reference/dbt_project.yml.md | 44 ++++++++++++----------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 3700961e19d..8896a96913c 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -1,23 +1,23 @@ 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. -dbt uses [YAML](https://yaml.org/) in a few different places. If you're new to YAML, it would be worth learning how arrays, dictionaries, and strings are represented. +- dbt uses [YAML](https://yaml.org/) in a few different places. If you're new to YAML, it would be worth learning how arrays, dictionaries, and strings are represented. -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 looks for the `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. +- By default, dbt looks for the `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`. +- Specify your dbt Cloud project ID in the `dbt_project.yml` file using `project-id` under the `dbt-cloud` config. Find your project ID in your dbt Cloud project URL: In example `https://cloud.getdbt.com/11/projects/123456`, the project ID is `123456`. -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. +- 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. ## Example @@ -247,29 +247,31 @@ vars: ## Naming convention -It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly. This is especially true for resource types with more than one word: +It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly. This is especially true for resource types with more than one word. -Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file: +- Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file. Here's an example for [saved queries](/docs/build/saved-queries#configure-saved-query): - - -```yml -[saved-queries](/docs/build/saved-queries#project-level-saved-queries): # Use dashes in the dbt_project.yml file. + + + ```yml + saved-queries: # Use dashes in the dbt_project.yml file. my_saved_query: config: +cache: enabled: true -``` - + ``` + -Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: +- Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: - + -```yml -[saved_queries](/docs/build/saved-queries#configure-saved-query): # Use underscores everywhere outside the dbt_project.yml file. - - name: SAVED_QUERY_NAME + ```yml + saved_queries: # Use underscores everywhere outside the dbt_project.yml file. + - name: saved_query_name + ... # Rest of the saved queries configuration. config: - group: GROUP_NAME -``` - + cache: + enabled: true + ``` + From a3ddc719830272184a81f3d7259826ac9d7b6c8d Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 29 May 2024 14:06:46 -0400 Subject: [PATCH 18/22] Apply suggestions from code review --- website/docs/docs/build/saved-queries.md | 2 +- website/docs/docs/build/semantic-models.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md index 30747bb196d..0e0a4814660 100644 --- a/website/docs/docs/build/saved-queries.md +++ b/website/docs/docs/build/saved-queries.md @@ -119,7 +119,7 @@ saved-queries: ``` -For more info on `dbt_project.yml` and config naming conventions, check out [naming convention](/reference/dbt_project.yml). +For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml). #### Where clause diff --git a/website/docs/docs/build/semantic-models.md b/website/docs/docs/build/semantic-models.md index 0ed9be53f1b..cb9da623e91 100644 --- a/website/docs/docs/build/semantic-models.md +++ b/website/docs/docs/build/semantic-models.md @@ -144,7 +144,7 @@ Semantic models support [`meta`](/reference/resource-configs/meta), [`group`](/r some_key: some_value ``` -For more info on `dbt_project.yml` and config naming conventions, check out [naming convention](/reference/dbt_project.yml). +For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml). From fb04bde6fc6ac7a23701e2ffd6523fc5dc5f8888 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 29 May 2024 14:52:41 -0400 Subject: [PATCH 19/22] Apply suggestions from code review --- website/docs/reference/dbt_project.yml.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 8896a96913c..14b636ffcdc 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -13,7 +13,7 @@ Every [dbt project](/docs/build/projects) needs a `dbt_project.yml` file — thi - By default, dbt looks for the `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. -- Specify your dbt Cloud project ID in the `dbt_project.yml` file using `project-id` under the `dbt-cloud` config. Find your project ID in your dbt Cloud project URL: In example `https://cloud.getdbt.com/11/projects/123456`, the project ID is `123456`. +- Specify your dbt Cloud project ID in the `dbt_project.yml` file using `project-id` under the `dbt-cloud` config. Find your project ID in your dbt Cloud project URL: For example, in `https://cloud.getdbt.com/11/projects/123456`, the project ID is `123456`. @@ -247,7 +247,7 @@ vars: ## Naming convention -It's important to follow the correct naming conventions for the YAML configs in your `dbt_project.yml` file to make sure dbt can understand them properly. This is especially true for resource types with more than one word. +It's important to follow the correct YAML naming conventions for the configs in your `dbt_project.yml` file to ensure dbt can process them properly. This is especially true for resource types with more than one word. - Use dashes (`-`) when configuring resource types with multiple words in your `dbt_project.yml` file. Here's an example for [saved queries](/docs/build/saved-queries#configure-saved-query): From 8545cec6da7bd92558e9cdfd01b99b9218141f82 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 29 May 2024 14:54:30 -0400 Subject: [PATCH 20/22] Update website/docs/reference/dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index 14b636ffcdc..be27a9d60f3 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -254,7 +254,7 @@ It's important to follow the correct YAML naming conventions for the configs in ```yml - saved-queries: # Use dashes in the dbt_project.yml file. + saved-queries: # Use dashes for resource types in the dbt_project.yml file. my_saved_query: config: +cache: From bec6abf704f33850c6208ba34fbbfdb57ac32ffe Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 29 May 2024 14:56:18 -0400 Subject: [PATCH 21/22] Apply suggestions from code review --- website/docs/docs/build/saved-queries.md | 2 +- website/docs/docs/build/semantic-models.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md index 0e0a4814660..9062734c856 100644 --- a/website/docs/docs/build/saved-queries.md +++ b/website/docs/docs/build/saved-queries.md @@ -119,7 +119,7 @@ saved-queries: ``` -For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml). +For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention). #### Where clause diff --git a/website/docs/docs/build/semantic-models.md b/website/docs/docs/build/semantic-models.md index cb9da623e91..627d95c1636 100644 --- a/website/docs/docs/build/semantic-models.md +++ b/website/docs/docs/build/semantic-models.md @@ -144,7 +144,7 @@ Semantic models support [`meta`](/reference/resource-configs/meta), [`group`](/r some_key: some_value ``` -For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml). +For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention). From 79b1428fd55d4603612e51b5deb3a0dd3a6cf786 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Wed, 29 May 2024 14:59:32 -0400 Subject: [PATCH 22/22] Update website/docs/reference/dbt_project.yml.md --- website/docs/reference/dbt_project.yml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt_project.yml.md b/website/docs/reference/dbt_project.yml.md index be27a9d60f3..65f9761c9bc 100644 --- a/website/docs/reference/dbt_project.yml.md +++ b/website/docs/reference/dbt_project.yml.md @@ -262,7 +262,7 @@ It's important to follow the correct YAML naming conventions for the configs in ``` -- Use underscore (`_`) when configuring resource types with multiple words outside the `dbt_project.yml` file: +- Use underscore (`_`) when configuring resource types with multiple words for YAML files other than the `dbt_project.yml` file. For example, here's the same saved queries resource in the `semantic_models.yml` file: