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

Configuring database for data tests #6313

Open
wants to merge 2 commits into
base: current
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions website/docs/reference/resource-configs/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,19 @@ This results in the generated relation being located in the `snapshots` database

<TabItem value="test" label="Tests">

Configure a database in your `dbt_project.yml` file.
Customize the database for storing test results in your `dbt_project.yml` file.

For example, to load a test into a database called `reporting` instead of the target database, you can configure it like this:
For example, to save test results in a specific database, you can configure it like this:

<File name='dbt_project.yml'>

```yml
tests:
- my_not_null_test:
column_name: order_id
type: not_null
+database: reporting
+store_failures: true
+database: test_results
```

This would result in the generated relation being located in the `reporting` database, so the full relation name would be `reporting.finance.my_not_null_test`.

This would result in the test results being stored in the `test_results` database.
</File>
</TabItem>
</Tabs>
Expand Down
Loading