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

[CT-793] [Feature] Testable _tmp tables in incremental models #5427

Closed
1 task done
NiallRees opened this issue Jun 30, 2022 · 4 comments
Closed
1 task done

[CT-793] [Feature] Testable _tmp tables in incremental models #5427

NiallRees opened this issue Jun 30, 2022 · 4 comments
Labels
enhancement New feature or request incremental Incremental modeling with dbt stale Issues that have gone stale Team:Adapters Issues designated for the adapter area of the code

Comments

@NiallRees
Copy link
Contributor

Is this your first time opening an issue?

Describe the Feature

Currently, it's only possible to apply dbt tests to the final table of an incremental model. There are circumstances where it would be useful to apply tests (both singular and generic) to the incremental _tmp table created by dbt in an incremental model. In large tables, it would drastically increase the speed and performance of tests by only tested new/updated data.

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

@NiallRees NiallRees added enhancement New feature or request triage labels Jun 30, 2022
@github-actions github-actions bot changed the title [Feature] Testable _tmp tables in incremental models [CT-793] [Feature] Testable _tmp tables in incremental models Jun 30, 2022
@jtcohen6 jtcohen6 self-assigned this Aug 9, 2022
@jtcohen6
Copy link
Contributor

Thanks @NiallRees! Two reasons I can see for wanting this:

I know folks have written (very tricky) custom materializations to accomplish both outcomes before. So long as the merge/upsert/overwrite logic is simple enough (and dbt really wants to keep it simple), there should be minimal or zero risk of the test passing on the "new" data (no dupes, no nulls, etc), and yet failing on the "final" table.

Out of curiosity, have you experimented with using the where config for generic tests? (It's not supported for singular tests, but I suppose it or something like it could be.) For instance, if you're always updating the last 1/3/7 days of data, could you limit the test query with a filter accordingly? That should be enough for Snowflake and BigQuery to prune partitions and run faster queries, though perhaps still slower than if the test ran against new data only.

@jtcohen6 jtcohen6 added Team:Adapters Issues designated for the adapter area of the code incremental Incremental modeling with dbt and removed triage labels Aug 20, 2022
@jtcohen6 jtcohen6 removed their assignment Aug 30, 2022
@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Feb 27, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2023
@mrcool4
Copy link

mrcool4 commented May 8, 2024

Hi Team, Any update on this feature?
Addition of this feature would mitigate the necessity for a rollback should a test failure occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request incremental Incremental modeling with dbt stale Issues that have gone stale Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

No branches or pull requests

3 participants