Skip to content

Commit

Permalink
[Draft] Update data test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver committed Oct 17, 2024
1 parent ce4095a commit 6a0e012
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/docs/docs/build/data-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ where {{ column_name }} is null
</TabItem>
</Tabs>

<VersionBlock firstVersion="1.9">

## Document data test descriptions

The details of data tests are available to view in dbt Explorer (Cloud) or by executing `dbt docs generate` and `dbt docs view` (Core). In addition to general details such as date, time run, and last run status, you can add a custom description using the `description` configuration in project .yml files. The description field can contain plain text or macro configurations and can be added to the `/test` directory in a .yml file (for example, `schema.yml`). Additionally, if you add the `description` config to the test in a model's .yml file, it will be documented as well.

</VersionBlock>

## Storing test failures

Normally, a data test query will calculate failures as part of its execution. If you set the optional `--store-failures` flag, the [`store_failures`](/reference/resource-configs/store_failures), or the [`store_failures_as`](/reference/resource-configs/store_failures_as) configs, dbt will first save the results of a test query to a table in the database, and then query that table to calculate the number of failures.
Expand Down

0 comments on commit 6a0e012

Please sign in to comment.