nick_hamlin
08/10/2021, 2:14 PMmeltano elt
with the --full-refresh
flag (or in any situation where FULL TABLE
replication is used) would cause the corresponding redshift table to be blown away and recreated with the hard deleted records no longer there. However, it looks like target_redshift is instead just running UPDATE statements under the hood, which is causing the deleted records to stick around. Any suggestions on how to fix this? (I’ll add more details in a thread to prevent this already long message from getting longer)nick_hamlin
08/10/2021, 2:16 PMadd_metadata_columns
, which I’ve turned on. In theory, it should set a value in the `_sdc_deleted_at`metadata column in situations where a hard delete has occurred (so that if one has also turned on the hard_deletes
setting, it can use the values in that column to figure out which records to remove. I’d though that was likely the answer, but it doesn’t look like values are getting set in that metadata column anywherenick_hamlin
08/10/2021, 2:18 PM_sdc_deleted_at
to filter out any deleted records in my staging layer in DBT easily enoughedward_smith
08/10/2021, 2:46 PM_sdc_deletetd_at
is only populated when using the LOG_BASED
replication method.nick_hamlin
08/10/2021, 3:04 PMnick_hamlin
08/10/2021, 3:05 PMFULL TABLE
replication to actually lead to “full refreshes” of a table such that the table in the target mirrors the state of the table in the source (without lingering hard deleted rows left hanging around)?edward_smith
08/10/2021, 3:28 PMFULL_TABLE
replication, you see it using UPDATE
statements and the deleted rows continue to exist in the target?edward_smith
08/10/2021, 3:29 PMnick_hamlin
08/10/2021, 4:07 PMnick_hamlin
08/10/2021, 4:07 PMnick_hamlin
08/10/2021, 4:07 PMaaronsteers
08/10/2021, 4:10 PM_sdc_batched_at
(or similar) to infer which have not been updated, and therefor which are detected to be deleted on the upstream source.aaronsteers
08/10/2021, 4:12 PM_sdc_batched_at
.nick_hamlin
08/10/2021, 4:12 PMaaronsteers
08/10/2021, 4:13 PMnick_hamlin
08/10/2021, 4:13 PMaaronsteers
08/10/2021, 4:14 PMkey_properties
) and targets will almost always use that as a merge update key. You can also suppress that default behavior in the catalog in order to basically "trick" your target into appending records instead of merging them.aaronsteers
08/10/2021, 4:17 PMnick_hamlin
08/10/2021, 4:25 PMnick_hamlin
08/10/2021, 4:26 PMnick_hamlin
08/10/2021, 4:26 PMaaronsteers
08/10/2021, 4:27 PMaaronsteers
08/10/2021, 4:28 PMaaronsteers
08/10/2021, 4:41 PMnick_hamlin
08/10/2021, 5:04 PM