From 5bed59dc4c4e118ba0d33b4b7340183445963bf7 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Thu, 20 Jun 2024 12:31:23 -0700 Subject: [PATCH 01/17] Improved support for custom configs in data tests --- website/docs/reference/data-test-configs.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index e7adc266b07..ba276625e4e 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -275,3 +275,23 @@ tests: ``` + +#### Specify custom adapter configurations to use + +_Currently available only in dbt Cloud. This will be rolling out to dbt Core later this year._ + +The following is an example of using `custom_config` to specify the adapter configurations that dbt should use when executing the test: + + +```yml + +models: + - name: my_model + columns: + - name: id + tests: + - unique: + - config: + custom_config: snowflake_warehouse + +``` \ No newline at end of file From 7ba3152986bef771dee5d26508e8ca6d493eee19 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Thu, 20 Jun 2024 12:55:44 -0700 Subject: [PATCH 02/17] Minor nits --- website/docs/reference/data-test-configs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index ba276625e4e..1faf0fd57e6 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -276,11 +276,11 @@ tests: -#### Specify custom adapter configurations to use +#### Specify custom configurations for generic data tests -_Currently available only in dbt Cloud. This will be rolling out to dbt Core later this year._ +_Currently available in dbt Cloud only. The `custom_config` key will become available in dbt Core later this year._ -The following is an example of using `custom_config` to specify the adapter configurations that dbt should use when executing the test: +Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom adapter configurations that dbt should use when executing the test: ```yml From 92663ae730ed5a8af0ba3045942ab7f916659f37 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Thu, 20 Jun 2024 13:00:07 -0700 Subject: [PATCH 03/17] Update example --- website/docs/reference/data-test-configs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index 1faf0fd57e6..838896d71c9 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,7 +280,7 @@ tests: _Currently available in dbt Cloud only. The `custom_config` key will become available in dbt Core later this year._ -Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom adapter configurations that dbt should use when executing the test: +Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the test: ```yml From c5f477013be17c91e28687624caa567d6d1fc08c Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Thu, 20 Jun 2024 13:03:53 -0700 Subject: [PATCH 04/17] One more --- website/docs/reference/data-test-configs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index 838896d71c9..c0ca63d02b5 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,7 +280,7 @@ tests: _Currently available in dbt Cloud only. The `custom_config` key will become available in dbt Core later this year._ -Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the test: +Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the `unique` data test: ```yml From 36cbdce4c1430faf1f16c2878455150436ce1002 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:44:02 -0700 Subject: [PATCH 05/17] Update website/docs/reference/data-test-configs.md Co-authored-by: Grace Goheen <53586774+graciegoheen@users.noreply.github.com> --- website/docs/reference/data-test-configs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index c0ca63d02b5..d02c0b99fa4 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -278,7 +278,7 @@ tests: #### Specify custom configurations for generic data tests -_Currently available in dbt Cloud only. The `custom_config` key will become available in dbt Core later this year._ +_Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the `unique` data test: From cf5230b64df433f86eadabd391474ee1c22e4099 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:44:34 -0700 Subject: [PATCH 06/17] Update website/docs/reference/data-test-configs.md Co-authored-by: Grace Goheen <53586774+graciegoheen@users.noreply.github.com> --- website/docs/reference/data-test-configs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index d02c0b99fa4..fa1226eda08 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,7 +280,7 @@ tests: _Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ -Use the `custom_config` key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the `unique` data test: +Use any custom config key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the `unique` data test: ```yml From ebb3ff594ee6a3e1317f2bda72e0c03b1d236002 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Tue, 9 Jul 2024 11:58:21 -0700 Subject: [PATCH 07/17] Fold in feedback --- website/docs/reference/data-test-configs.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index fa1226eda08..ad0774abca0 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,18 +280,20 @@ tests: _Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ -Use any custom config key to specify custom configurations for data tests. For example, the following specifies custom Snowflake configurations that dbt should use when executing the `unique` data test: - +Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. The config defines the size of the virtual warehouse which will help improve performance and reduce costs during runs: ```yml models: - name: my_model columns: - - name: id + - name: color tests: - - unique: - - config: - custom_config: snowflake_warehouse + - accepted_values: + values: ['blue', 'red'] + config: + severity: warn + snowflake_warehouse: my_warehouse + post-hook: "ANALYZE TABLE my_model" ``` \ No newline at end of file From 1ce9ee8de811635411d547f29c1d0c02619b5419 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Tue, 9 Jul 2024 12:17:35 -0700 Subject: [PATCH 08/17] Add release note --- website/docs/docs/dbt-versions/release-notes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index 2fc0f49673a..62c08df3b01 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -18,6 +18,11 @@ Release notes are grouped by month for both multi-tenant and virtual private clo [^*] The official release date for this new format of release notes is May 15th, 2024. Historical release notes for prior dates may not reflect all available features released earlier this year or their tenancy availability. +## July 2024 +- **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, defining specific charactistics of the virtual warehouse). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). + + Support for this is currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year. + ## June 2024 - **New:** Introduced new granularity support for cumulative metrics in MetricFlow. Granularity options for cumulative metrics are slightly different than granularity for other metric types. For other metrics, we use the `date_trunc` function to implement granularity. However, because cumulative metrics are non-additive (values can't be added up), we can't use the `date_trunc` function to change their time grain granularity. From e412dddbfe2d43e99a1a5a39e75a5ee86127d9ab Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:17:37 -0700 Subject: [PATCH 09/17] Update website/docs/docs/dbt-versions/release-notes.md --- website/docs/docs/dbt-versions/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index 62c08df3b01..0fa65ab62ae 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -19,7 +19,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo [^*] The official release date for this new format of release notes is May 15th, 2024. Historical release notes for prior dates may not reflect all available features released earlier this year or their tenancy availability. ## July 2024 -- **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, defining specific charactistics of the virtual warehouse). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). +- **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, specifying the virtual warehouse characteristics to use). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). Support for this is currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year. From 9b2bba14e704787df1afbcff59e19f21a4b78c66 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:20:57 -0700 Subject: [PATCH 10/17] Update website/docs/reference/data-test-configs.md --- website/docs/reference/data-test-configs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index ad0774abca0..be2ea76e89b 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,7 +280,7 @@ tests: _Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ -Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. The config defines the size of the virtual warehouse which will help improve performance and reduce costs during runs: +Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. The config defines the size of the virtual warehouse that you want used to help improve performance and reduce costs during runs: ```yml From 85fb267808c6c6bd019f0cc1df98532bdc7db3b2 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:51:35 -0700 Subject: [PATCH 11/17] Update website/docs/docs/dbt-versions/release-notes.md Co-authored-by: Jeremy Cohen --- website/docs/docs/dbt-versions/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index 0fa65ab62ae..f8007b09649 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -19,7 +19,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo [^*] The official release date for this new format of release notes is May 15th, 2024. Historical release notes for prior dates may not reflect all available features released earlier this year or their tenancy availability. ## July 2024 -- **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, specifying the virtual warehouse characteristics to use). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). +- **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, specifying a Snowflake virtual warehouse different from the one in your connection). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). Support for this is currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year. From 17ef26b779dac6daa3cb88c21d753a4000b2069e Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:51:47 -0700 Subject: [PATCH 12/17] Update website/docs/docs/dbt-versions/release-notes.md Co-authored-by: Jeremy Cohen --- website/docs/docs/dbt-versions/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index f8007b09649..1ee851f0be2 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -21,7 +21,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo ## July 2024 - **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, specifying a Snowflake virtual warehouse different from the one in your connection). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). - Support for this is currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year. +Support for this configuration is available in dbt Cloud when selecting "Keep on latest version." Specifying custom configurations for data tests will become available in dbt Core later this year. ## June 2024 - **New:** Introduced new granularity support for cumulative metrics in MetricFlow. Granularity options for cumulative metrics are slightly different than granularity for other metric types. For other metrics, we use the `date_trunc` function to implement granularity. However, because cumulative metrics are non-additive (values can't be added up), we can't use the `date_trunc` function to change their time grain granularity. From 3686392d8892c43dce85bc575b58ee43476dcee9 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:52:05 -0700 Subject: [PATCH 13/17] Update website/docs/reference/data-test-configs.md Co-authored-by: Jeremy Cohen --- website/docs/reference/data-test-configs.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index be2ea76e89b..283654bfd16 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -294,6 +294,5 @@ models: config: severity: warn snowflake_warehouse: my_warehouse - post-hook: "ANALYZE TABLE my_model" ``` \ No newline at end of file From 811ebac4dd4acbcd2a3afcf25152fbc03f937e7f Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Thu, 18 Jul 2024 07:37:26 -0700 Subject: [PATCH 14/17] Feedback --- website/docs/docs/dbt-versions/release-notes.md | 2 +- website/docs/reference/data-test-configs.md | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index 27af32ee44b..6e9b86124d4 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -21,7 +21,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo ## July 2024 - **Enhancement:** Custom configurations are now supported by generic data tests. Use this to configure how dbt should run the data test (for example, specifying a Snowflake virtual warehouse different from the one in your connection). To learn more, refer to [Specify custom configurations for generic data tests](/reference/data-test-configs#specify-custom-configurations-for-generic-data-tests). -Support for this configuration is available in dbt Cloud when selecting "Keep on latest version." Specifying custom configurations for data tests will become available in dbt Core later this year. + Support for this configuration is available in dbt Cloud when selecting "Keep on latest version." Specifying custom configurations for data tests will become available in dbt Core later this year. - **New**: The ability to lint your SQL files from the dbt Cloud CLI is now available. To learn more, refer to [Lint SQL files](/docs/cloud/configure-cloud-cli#lint-sql-files). - **New**: Introduced Semantic validations in CI pipelines. Automatically test your semantic nodes (metrics, semantic models, and saved queries) during code reviews by adding warehouse validation checks in your CI job using the `dbt sl validate` command. You can also validate modified semantic nodes to guarantee code changes made to dbt models don't break these metrics. Refer to [Semantic validations in CI](/docs/deploy/ci-jobs#semantic-validations-in-ci) to learn about the additional commands and use cases. diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index 283654bfd16..e20d75eede0 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,7 +280,15 @@ tests: _Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ -Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. The config defines the size of the virtual warehouse that you want used to help improve performance and reduce costs during runs: +Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. + +The config defines the size of the virtual warehouse that you want used to help improve performance and reduce costs during runs: + +You can specify a Snowflake virtual warehouse (than the one in your default connection) + + +This way, the data test will run on a different virtual warehouse from the connection default — enabling better price-performance with a different warehouse size, or more-granular cost allocation and visiblity. + ```yml From 4029623d9084b2cdcf4d73487d47ca1991cbd908 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Tue, 23 Jul 2024 13:52:43 -0700 Subject: [PATCH 15/17] Feedback --- website/docs/reference/data-test-configs.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index e20d75eede0..b93adba28aa 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,15 +280,7 @@ tests: _Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ -Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. - -The config defines the size of the virtual warehouse that you want used to help improve performance and reduce costs during runs: - -You can specify a Snowflake virtual warehouse (than the one in your default connection) - - -This way, the data test will run on a different virtual warehouse from the connection default — enabling better price-performance with a different warehouse size, or more-granular cost allocation and visiblity. - +Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. Given the config, the data test runs on a different Snowflake virtual warehouse than the one in your default connection to enable better price-performance with a different warehouse size, or more granular cost allocation and visibility. ```yml From b92c88ece33a1306b5172d448e60c7b90b72cb05 Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Tue, 23 Jul 2024 14:58:47 -0700 Subject: [PATCH 16/17] Feedback --- website/docs/reference/data-test-configs.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index b93adba28aa..c855ba979c3 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -280,7 +280,7 @@ tests: _Currently available in dbt Cloud only. Specifying custom configurations for data tests will become available in dbt Core later this year._ -Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test. Given the config, the data test runs on a different Snowflake virtual warehouse than the one in your default connection to enable better price-performance with a different warehouse size, or more granular cost allocation and visibility. +Use any custom config key to specify custom configurations for data tests. For example, the following specifies the `snowflake_warehouse` custom config that dbt should use when executing the `accepted_values` data test: ```yml @@ -295,4 +295,6 @@ models: severity: warn snowflake_warehouse: my_warehouse -``` \ No newline at end of file +``` + +Given the config, the data test runs on a different Snowflake virtual warehouse than the one in your default connection to enable better price-performance with a different warehouse size, or more granular cost allocation and visibility. \ No newline at end of file From 44b58706db5479b30a68945ee6b9570e1ddeaf3f Mon Sep 17 00:00:00 2001 From: Ly Nguyen Date: Tue, 23 Jul 2024 14:59:35 -0700 Subject: [PATCH 17/17] Nit --- website/docs/reference/data-test-configs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index c855ba979c3..d98392a350b 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -297,4 +297,4 @@ models: ``` -Given the config, the data test runs on a different Snowflake virtual warehouse than the one in your default connection to enable better price-performance with a different warehouse size, or more granular cost allocation and visibility. \ No newline at end of file +Given the config, the data test runs on a different Snowflake virtual warehouse than the one in your default connection to enable better price-performance with a different warehouse size or more granular cost allocation and visibility. \ No newline at end of file