How Does Fivetran Track Deleted Xero Records?
Question
How does Fivetran track deleted Xero records, and how can I identify them in my destination?
Environment
Connector: Xero
Answer
Fivetran tracks deleted Xero records using different methods depending on the table structure.
Tables that include a _fivetran_deleted column
In some tables, we add a _fivetran_deleted column. When this column is set to true, it means the record was deleted in Xero and has been soft-deleted in your destination. For more information, see our system columns documentation.
The following tables use this method:
CONTACTCONTACT_GROUP_MEMBER
Tables that use the status column
Some tables include a status column instead of a _fivetran_deleted column. A value of ARCHIVED indicates that the record has been deleted or deactivated in Xero.
The following tables use this method:
ACCOUNTBANK_TRANSACTIONCONTACT_GROUPCREDIT_NOTEEXPENSE_CLAIMINVOICEMANUAL_JOURNALOVERPAYMENTPAYMENTPREPAYMENTRECEIPTREPEATING_INVOICETAX_RATETRACKING_CATEGORYTRACKING_CATEGORY_OPTION
Tables that don't support capturing deletes
Some Xero tables don't include a status or _fivetran_deleted column. We don't track deletions for these tables.
Child tables
Child tables support deletes through weak primary keys.