Does the before_begin helper macro not work for DBT version 1.1?

Hello everyone!

Earlier while using DBT version 0.17, we used to have some pre_hook queries defined. Basically it was to update an audit table to be later re-updated when the job is successful. With our pre_hook, we used before_begin helper macro, so that even if the transaction fails, the audit table update doesnt get impacted.

{{
    config(
        pre_hook = before_begin(pre_hook_query)
    )                       
}}

However, with DBT 1.1 version, it seems that the before_begin macro is not updating our audit tables. Has there been any changes to dbt in terms of these helper macros?

They’re still in the docs: pre-hook & post-hook | dbt Docs

Are you on snowflake by any chance? There was a change to transactions with the snowflake adapter (they’re no longer explicitly used) which could be a contributor…. See the notes here

1 Like

You are right!! No more use of transaction = False in your config post 0.21. Thats why it isn’t working!!