Skip to content

Commit

Permalink
Merge branch 'current' into acces-url
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver authored Jul 30, 2024
2 parents b64a110 + 69ed369 commit a2b9f3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions website/docs/reference/resource-configs/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,16 @@ seeds:

### Tests

Customize the name of the schema in which tests [configured to store failures](/reference/resource-configs/store_failures) will save their results:
Customize the name of the schema in which tests [configured to store failures](/reference/resource-configs/store_failures) will save their results.
The resulting schema is `{{ profile.schema }}_{{ tests.schema }}`, with a default suffix of `dbt_test__audit`.
To use the same profile schema, set `+schema: null`.

<File name='dbt_project.yml'>

```yml
tests:
+store_failures: true
+schema: the_island_of_misfit_tests
+schema: _sad_test_failures # Will write tables to my_database.my_schema__sad_test_failures
```

</File>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/resource-configs/store_failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Optionally set a test to always or never store its failures in the database.
- If specified as `true` or `false`, the
`store_failures` config will take precedence over the presence or absence of the `--store-failures` flag.
- If the `store_failures` config is `none` or omitted, the resource will use the value of the `--store-failures` flag.
- When true, `store_failures` saves all the record(s) that failed the test only if [limit](/reference/resource-configs/limit) is not set or if there are fewer records than the limit. `store_failures` are saved in a new table with the name of the test.
- When true, `store_failures` saves all records (up to [limit](/reference/resource-configs/limit)) that failed the test. Failures are saved in a new table with the name of the test. By default, `store_failures` uses the schema `{{ profile.schema }}_dbt_test__audit`, but you can [configure](/reference/resource-configs/schema#tests) the schema suffix to a different value.
- A test's results will always **replace** previous failures for the same test, even if that test results in no failures.
- By default, `store_failures` uses a schema named `dbt_test__audit`, but, you can [configure](/reference/resource-configs/schema#tests) the schema to a different value. Ensure you have the authorization to create or access schemas for your work. For more details, refer to the [FAQ](#faqs).

Expand Down

0 comments on commit a2b9f3c

Please sign in to comment.