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

Fix store_failures schema documentation #5047

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

brunokim
Copy link
Contributor

@brunokim brunokim commented Mar 6, 2024

What are you changing in this pull request and why?

I'm documenting how the config tests.schema is currently used. It does not define the schema where to store test failures, but the schema suffix appended to the configured profile schema.

I discovered this via trial-and-error, there may be other edge cases I haven't considered.

Checklist

@brunokim brunokim requested a review from a team as a code owner March 6, 2024 21:23
Copy link

welcome bot commented Mar 6, 2024

Hello!👋 Thanks for contributing to the dbt product documentation and opening this pull request! ✨
We use Markdown and some HTML to write the dbt product documentation. When writing content, you can use our style guide and content types to understand our writing standards and how we organize information in the dbt product docs.
We'll review your contribution and respond as soon as we can. 😄

Copy link

vercel bot commented Mar 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 1 unresolved Jul 30, 2024 9:22pm

@runleonarun runleonarun added the new contributor Label for first-time contributors label Mar 6, 2024
@github-actions github-actions bot added content Improvements or additions to content size: x-small This change will take under 3 hours to fix. labels Mar 6, 2024
@brunokim
Copy link
Contributor Author

Hey, I see there's a conflict here, do I need to take some action?

@@ -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` save 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. By default, `store_failures` use a schema named `dbt_test__audit`, but, you can [configure](/reference/resource-configs/schema#tests) the schema to a different value.
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiya @brunokim,

Thanks for flagging this. This looks really good. I have no changes or suggestions on my end. I'll also look at the merge conflict for you.

Kind Regards
Natalie

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @brunokim and @nataliefiann , fixed up the merge conflict!


<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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiya @brunokim

This is really good and great use of the example!

Kind Regards
Natalie

@matthewshaver matthewshaver enabled auto-merge (squash) July 30, 2024 21:09
@matthewshaver matthewshaver merged commit 69ed369 into dbt-labs:current Jul 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content new contributor Label for first-time contributors size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants