Hey
Sorry for the basic question, I’m new to the tool and I LOVE it !
Here is the topic :
I have a seed called “deleted_records” and that is loaded in my dwh. I want to use it to delete records from another table upon update.
I have a very simple question. Do you know why this works :
{{
config(
materialized=‘incremental’
, unique_key = [‘transaction_nsid’, ‘transaction_line_nsid’]
, post_hook = ‘DELETE FROM {{this}} WHERE transaction_nsid IN (SELECT transaction_nsid FROM [dbo_stg].[deleted_records] )’
)
}}
While this does not :
{{
config(
materialized=‘incremental’
, unique_key = [‘transaction_nsid’, ‘transaction_line_nsid’]
, post_hook = ‘DELETE FROM {{this}} WHERE transaction_nsid IN (SELECT transaction_nsid FROM {{ ref(‘deleted_records’) }} )’
)
}}
Using the source keyword instead of ref does not work either
I hope you can help me