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

[Feature] I want my unit tests to optionally execute pre/post hooks #9683

Closed
3 tasks done
graciegoheen opened this issue Feb 27, 2024 · 1 comment
Closed
3 tasks done
Labels
dbt tests Issues related to built-in dbt testing functionality enhancement New feature or request

Comments

@graciegoheen
Copy link
Contributor

graciegoheen commented Feb 27, 2024

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Some folks use pre/post-hooks do define DML they want to be executed on their model (merge statements, etc.).

Currently, if folks unit test a model that has a pre/post-hook the hook is ignored (not executed) for the unit test.

This prevents some people from accurately testing the output of their model.

We should allow folks to optionally execute the pre/post-hooks on their unit test. The default should continue to be - we don't execute pre/post-hooks.

Likely blocked by this investigation #8499

Describe alternatives you've considered

Folks are unable to accurately unit test models with pre/post-hooks

@graciegoheen graciegoheen added enhancement New feature or request triage dbt tests Issues related to built-in dbt testing functionality labels Feb 27, 2024
@graciegoheen
Copy link
Contributor Author

I'm going to close this out for now - but if you're interested leave a comment and we may re-open in the future!

@graciegoheen graciegoheen closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@dbeatty10 dbeatty10 removed the triage label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt tests Issues related to built-in dbt testing functionality enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants