Closed MarthaScheffler closed 1 month ago
Thank you for identifying this issue. The post_hook
and pre_hook
should both work correctly now. You were absolutely right about the missing line for post-hooks (inside_transaction=True
). I’ve added a unit test to ensure this doesn’t regress in the future.
Thanks for spotting this!
thank you for the swift fix!
When adding a post-hook to an incremental stream model (doesn't matter if it references a source or another model), the post-hook doesn't get executed. Pre-hooks get executed just fine.
code example for testing:
I can see that the code for the materialization has two lines for pre-hooks, but just one for post-hooks (
inside_transaction=True
is missing): https://github.com/arnoN7/dbt-incremental-stream/blob/master/macros/materializations/incremental_stream.sql#L148