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

Propose an update to data-tests.md #5607

Merged
merged 10 commits into from
Jun 18, 2024
3 changes: 3 additions & 0 deletions website/docs/docs/build/data-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ The name of this test is the name of the file: `assert_total_payment_amount_is_p

Singular data tests are easy to write—so easy that you may find yourself writing the same basic structure over and over, only changing the name of a column or model. By that point, the test isn't so singular! In that case, we recommend...

As with every dbt asset, we should also document the data tests by adding their YAML configuration.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved


## Generic data tests
Certain data tests are generic: they can be reused over and over again. A generic data test is defined in a `test` block, which contains a parametrized query and accepts arguments. It might look like:

Expand Down
2 changes: 2 additions & 0 deletions website/docs/faqs/Tests/available-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ Out of the box, dbt ships with the following tests:
You can also write your own [custom schema data tests](/docs/build/data-tests).

Some additional custom schema tests have been open-sourced in the [dbt-utils package](https://github.com/dbt-labs/dbt-utils/tree/0.2.4/#schema-tests), check out the docs on [packages](/docs/build/packages) to learn how to make these tests available in your project.

Note that although you can't document data tests as of yet, we recommend checking out [this dbt Core discussion](https://github.com/dbt-labs/dbt-core/issues/2578) where the dbt community shares ideas.
Loading