Post Hook Formatting in Config block within models causing deprecation

The problem I’m having

I am trying to fix up the deprecated functionality with the changes to dbt. However, I am having a bit of issues with post_hook in the config part of the model. This is what I have right now

{{ config(
    post_hook=[
        "insert into {{ this }} (dim_date_key) select '1900-01-01' as dim_date_key"
    ]
) }}

What I’ve already tried

I’ve tried changing the config to the below, however having it as meta doesn’t actually run the post_hook from my experience

{{ config(
    meta =
        {"post_hook":[
        "insert into {{ this }} (dim_date_key) select '1900-01-01' as dim_date_key"
    ]
    }
) }}

image

I have been following the official documentation and it still has it as the original format which we have right now.

False positive warning https://github.com/dbt-labs/dbt-core/issues/12087

Note: @Jeremy Yeo originally posted this reply in Slack. It might not have transferred perfectly.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.