Skip to content

Commit

Permalink
Generic data tests accept arbitrary configs (#6312)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Closes #6274

## Checklist
- [x] I have reviewed 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.

<!-- vercel-deployment-preview -->
---
🚀 Deployment available! Here are the direct links to the updated files:


-
https://docs-getdbt-com-git-dbeatty-docs-issue-5548-dbt-labs.vercel.app/reference/data-test-configs

<!-- end-vercel-deployment-preview -->

---------

Co-authored-by: Leona B. Campbell <[email protected]>
Co-authored-by: Mirna Wong <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent 25c95dd commit c90f8fb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions website/docs/reference/data-test-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,24 @@ tests:
```

</File>

#### Specify custom configurations for generic data tests

Beginning in dbt v1.9, you can 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.

0 comments on commit c90f8fb

Please sign in to comment.