From 37cb53aeddf9e40c207281972cf955f221614934 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Thu, 17 Oct 2024 12:17:46 -0600 Subject: [PATCH] New feature: generic data tests accept arbitrary configs --- website/docs/reference/data-test-configs.md | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/website/docs/reference/data-test-configs.md b/website/docs/reference/data-test-configs.md index e7adc266b07..747a87e9342 100644 --- a/website/docs/reference/data-test-configs.md +++ b/website/docs/reference/data-test-configs.md @@ -275,3 +275,26 @@ tests: ``` + +#### Specify custom configurations for generic data 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: + +```yml + +models: + - name: my_model + columns: + - name: color + tests: + - accepted_values: + values: ['blue', 'red'] + config: + severity: warn + snowflake_warehouse: my_warehouse + +``` + +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.