[Bug] Model properties.yml file appears to support post-hook
and post_hook
but not really
#10965
Open
2 tasks done
Labels
bug
Something isn't working
Is this a new bug in dbt-core?
Current Behavior
When setting hooks in
properties.yml
files, our docs (https://docs.getdbt.com/reference/resource-configs/pre-hook-post-hook) point out that we should dopost_hook
instead ofpost-hook
. However,post-hook
still appear to work - but not fully ({{ ref() }}
and{{ this }}
) don't get resolved like if we usedpost_hook
.We should make them both work the same way or just stop
post-hook
from being a thing evaluated at all.Expected Behavior
Either:
post-hook
is ignored inproperties.yml
.post-hook
andpost_hook
work the same way when resolving{{ ref() }} / {{ this }}
(and maybe other conditions? not sure).Steps To Reproduce
^ We can see did try to run the "hook" but
{{ this }}
didn't get resolved:Let's modify our yaml:
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
If you tried to use
ref()
inpost-hook
- you'll get aref()
is undefined error. But if usingref()
inpost_hook
- it's all good.Also tried on older dbt versions (1.7) - same inconsistency there too.
The text was updated successfully, but these errors were encountered: