Hi i'm currently working on a dbt solution that is using 2 sources that has to merge to a destination table, i'm using
{{
config(
unique_key = ['col1', 'col2', 'col3'],
merge_exclude_columns = ['col1', 'col2', 'col3']
)
}}
The thing is that i need to use other two tables to only update some rows (that match on this 3 columns (col1, col2 and col3)). I don't need to use a standard merge that inserts and updates the rows when the join is made but only update the rows when this matches,
How could i make this happen?
Thanks
If I understand you correctly, you need the
LEFT JOINoperation, not theincrementaldbt models.merge_exclude_columnsis used formaterialized='incremental'models, not views or tables.I guess you need a dbt model like this:
dbt will recreate this table from scratch on every run.
Please let me know if I misunderstood your question.