The problem I’m having
I’ve created a macro to have a custom Incremental Merge and call it get_incremental_merge_conditional_sql
Then call this Macro in my models by this config setting:
{{config(
materialized='incremental',
incremental_strategy='merge_conditional',
unique_key = ['order_id','status'],
predicates = ['DBT_INTERNAL_SOURCE.status_datetime_nzt > DBT_INTERNAL_DEST.status_datetime_nzt'],
update_date_column = ['status_datetime_nzt'],
tags=["magento"]
)}}
When I run my model return this error:
Invalid incremental strategy provided: merge_conditional
Expected one of: 'merge', 'replace_where', 'append', 'insert_overwrite'
looks Models can not find this new Macro…
I’ve used this document to create a new Incremental macro:
Do I need to do more settings, please help
Thanks
Mali
The context of why I’m trying to do this
What I’ve already tried
Some example code or error messages
Put code inside backticks
to preserve indentation
which is especially important
for Python and YAML!