Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic data tests accept arbitrary configs #6312

Merged
merged 7 commits into from
Nov 14, 2024
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 @@
```

</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:

Check warning on line 281 in website/docs/reference/data-test-configs.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/reference/data-test-configs.md#L281

[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'? ", "location": {"path": "website/docs/reference/data-test-configs.md", "range": {"start": {"line": 281, "column": 18}}}, "severity": "WARNING"}

```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.
Loading