-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: More granular on-start and on-end hooks #3463
Comments
@djbelknapdbs Thanks for opening! I think, rather than a different
What do you think?
I think that's right, so this change wouldn't work for the particular use case. As a general rule, though, I think the feature would be valuable! There are some context variables, such as |
The actual change to the The trickier change would be the complementary addition of a Worth saying that the |
Describe the feature
Each dbt command should have its own set of on-[command]-start and on-[command]-end hooks, rather than just on-run-start and on-run-end that aren't specific to the
run
command. For example,on-test-start
would run at the start ofdbt test
,on-source-start
would run at the start ofdbt source snapshot-freshness
, etc.Describe alternatives you've considered
I can run a second command right after the first one
Additional context
I'm opening this now because I'm trying to incorporate the dbt_artifacts package, and it would be really handy to be able to trigger it in the on-[command]-end hook. Now that I'm typing this, I'm not positive the artifacts would be saved out during the hook so maybe it wouldn't work anyways, but I still think the feature is valuable. I had an earlier use case where I wanted to run a command on-test-start and on-test-end which I've forgotten, but I think it had to do with adjusting Snowflake warehouse usage.
Who will this benefit?
Developers and admins who want more ability to trigger events or processes related to specific dbt commands.
Are you interested in contributing this feature?
This is probably beyond me
The text was updated successfully, but these errors were encountered: