[CT-1264] [Feature] Support "debugging columns" across multiple tests #5952
Labels
enhancement
New feature or request
help_wanted
Trickier changes, with a clear starting point, good for previous/experienced contributors
Refinement
Maintainer input needed
stale
Issues that have gone stale
utils
Cross-database building blocks
Is this your first time submitting a feature request?
Describe the feature
Some tests, including
not_null
and (soon)dbt_utils.expression_is_true
use thestore_failures
configuration to decide which columns to select. This improves performance and controls costs in some engines (notably BigQuery).This still leaves us with expensive queries when store failures is turned on, however, and leaves us with no debugging information when it's turned off. As discussed in dbt-labs/dbt-utils#683 (comment) I think it would be useful to allow tests to configure a set of columns to select which would then be used instead of
*
for storing tests and1
when not storing tests. The existing tests mentioned above are obvious candidates for this functionality; there may be others as well.@joellabes appears to have a pretty good handle on how this would work (I don't!) and has provided some example code there that I'm happy to look at integrating if there's interest in this idea.
Describe alternatives you've considered
Leave as is; developers when debugging can manually add the columns they need, and can eat the additional costs if storing failures.
Who will this benefit?
Improves DX when debugging test failures, both interactively (copying the compiled test code will include appropriate columns) and when reviewing stored failures (as an already-appropriate-for-this-test-failure subset of columns will be included instead of everything).
Reduces costs for stored test failures on engines where this matters (BigQuery) which still use
select *
.Are you interested in contributing this feature?
Happy to help; minimal understanding of dbt internals, beginner dbt user. I had managed to contribute very simple changes to dbt utils with some assistance though!
Anything else?
No.
The text was updated successfully, but these errors were encountered: