diff --git a/definitions/staging/stg_csc_agent.sqlx b/definitions/staging/stg_csc_agent.sqlx index 4abfc90..42c9ad0 100644 --- a/definitions/staging/stg_csc_agent.sqlx +++ b/definitions/staging/stg_csc_agent.sqlx @@ -14,7 +14,7 @@ config { with csc_rev_deduplicated as ( select *, ROW_NUMBER() - OVER (PARTITION BY RESORT, CONFIRMATION_NO, CHANGE_DATE) + OVER (PARTITION BY UPDATE_USER, CONFIRMATION_NO, CHANGE_DATE, UPDATE_TYPE) row_number from ${ref("pphe_five9_raw","csc_rev_changes_*")} ${ when(incremental(), `where _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',current_date("Europe/Amsterdam"))`) }) --last date table is taken