How Can I Preserve Deleted Rows When Replacing a Connection?
Question
How can I preserve rows marked as _fivetran_deleted=TRUE when replacing an existing connection?
Environment
All connectors
Answer
A replacement connection doesn't inherit deleted rows from the existing connection. To preserve this data, you must manually backfill the rows into the tables populated by the replacement connection:
- Ensure the new destination tables are compatible with the historical data. If the replacement table contains additional columns, leave them
NULLor provide valid default values. - Copy rows where
_fivetran_deleted=TRUEfrom the existing connection's destination tables to the corresponding new tables. - Confirm that the rows are present, remain marked
_fivetran_deleted=TRUE, and don't affect subsequent syncs.
For more information about how we handle deleted records, see Soft Delete Mode.