<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Do not null destination row values when source deleted in Stitch</title>
    <link>https://community.qlik.com/t5/Stitch/Do-not-null-destination-row-values-when-source-deleted/m-p/2545367#M145</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336479"&gt;@paulmwatson&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;What you're seeing is actually expected behavior with log based CDC replication in Stitch.&lt;/P&gt;
&lt;P&gt;When a document is deleted in MongoDB the change stream only includes the document's _id and some metadata about the operation it doesn't include the full document fields (like name). Because of that, Stitch has no way to retain the previous values when processing a delete.&lt;/P&gt;
&lt;P&gt;As per the documentation, Stitch handles this by overwriting the existing row:&lt;/P&gt;
&lt;P&gt;The primary key (_id) is preserved&lt;/P&gt;
&lt;P&gt;_sdc_deleted_at is populated with the deletion timestamp&lt;/P&gt;
&lt;P&gt;All other columns are set to NULL&lt;/P&gt;
&lt;P&gt;So what you end up with is essentially a tombstone record it marks that the document was deleted, but it doesn't keep the original field values.&lt;/P&gt;
&lt;P&gt;At the moment, there isn't a configuration option in Stitch to change this behavior for log based replication.&lt;/P&gt;
&lt;P&gt;If retaining the field values after deletion is important for your use case, you could consider a couple of alternatives:&lt;/P&gt;
&lt;P&gt;Use soft deletes in MongoDB&lt;BR /&gt;Instead of deleting documents, add a field like deleted_at. This way, Stitch treats it as an update and keeps all the column values intact.&lt;/P&gt;
&lt;P&gt;Use a different replication method&lt;BR /&gt;Full-table replication can preserve values, but it comes with trade offs like higher load.&lt;/P&gt;
&lt;P&gt;This behavior is also described in the Stitch docs under Hard deletes with Log based Incremental:&lt;BR /&gt;&lt;A href="https://www.stitchdata.com/docs/replication/deleted-record-handling" target="_blank"&gt;https://www.stitchdata.com/docs/replication/deleted-record-handling&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps clarify things!&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2026 14:11:37 GMT</pubDate>
    <dc:creator>Soheb_Algur</dc:creator>
    <dc:date>2026-03-24T14:11:37Z</dc:date>
    <item>
      <title>Do not null destination row values when source deleted</title>
      <link>https://community.qlik.com/t5/Stitch/Do-not-null-destination-row-values-when-source-deleted/m-p/2543437#M143</link>
      <description>&lt;P&gt;How do we configure Stitch CDC&amp;nbsp;Log-Based Incremental Replication (from MongoDB Atlas to AWS RDS PostgreSQL) to not null values in destination rows when a source document is deleted?&lt;/P&gt;
&lt;P&gt;We end up with rows like this:&lt;/P&gt;
&lt;TABLE dir="ltr" border="1" cellspacing="0" cellpadding="0" data-sheets-baot="1" data-sheets-root="1"&gt;&lt;COLGROUP&gt;&lt;COL width="184" /&gt;&lt;COL width="179" /&gt;&lt;COL width="179" /&gt;&lt;COL width="153" /&gt;&lt;COL width="148" /&gt;&lt;COL width="122" /&gt;&lt;COL width="289" /&gt;&lt;COL width="153" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;_id&lt;/TD&gt;
&lt;TD&gt;_sdc_batched_at&lt;/TD&gt;
&lt;TD&gt;_sdc_extracted_at&lt;/TD&gt;
&lt;TD&gt;_sdc_received_at&lt;/TD&gt;
&lt;TD&gt;_sdc_sequence&lt;/TD&gt;
&lt;TD&gt;_sdc_table_version&lt;/TD&gt;
&lt;TD&gt;name&lt;/TD&gt;
&lt;TD&gt;_sdc_deleted_at&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;687a35b9606062c59c5a5428&lt;/TD&gt;
&lt;TD&gt;2026-02-19 19:12:16.465+00&lt;/TD&gt;
&lt;TD&gt;2026-02-19 19:04:11.522+00&lt;/TD&gt;
&lt;TD&gt;2026-02-19 19:04:31+00&lt;/TD&gt;
&lt;TD&gt;1771527862209286200&lt;/TD&gt;
&lt;TD&gt;1771513244411&lt;/TD&gt;
&lt;TD&gt;ACME Inc&lt;/TD&gt;
&lt;TD&gt;NULL&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;687a35f9606062c59c5a67ae&lt;/TD&gt;
&lt;TD&gt;2026-02-19 19:12:16.466+00&lt;/TD&gt;
&lt;TD&gt;2026-02-19 19:04:11.522+00&lt;/TD&gt;
&lt;TD&gt;2026-02-19 19:04:31+00&lt;/TD&gt;
&lt;TD&gt;1771527862209315701&lt;/TD&gt;
&lt;TD&gt;1771513244411&lt;/TD&gt;
&lt;TD&gt;Nala Bing&lt;/TD&gt;
&lt;TD&gt;NULL&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;698e6c34fa53f8ab7e921e4c&lt;/TD&gt;
&lt;TD&gt;2026-02-20 07:02:25.878+00&lt;/TD&gt;
&lt;TD&gt;2026-02-20 07:01:47.149+00&lt;/TD&gt;
&lt;TD&gt;2026-02-20 07:02:09+00&lt;/TD&gt;
&lt;TD&gt;1771570907959430902&lt;/TD&gt;
&lt;TD&gt;1771513244411&lt;/TD&gt;
&lt;TD&gt;NULL&lt;/TD&gt;
&lt;TD&gt;2026-02-20 06:47:20+00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;698dc416c7e4363d38349382&lt;/TD&gt;
&lt;TD&gt;2026-02-20 07:02:25.878+00&lt;/TD&gt;
&lt;TD&gt;2026-02-20 07:01:47.149+00&lt;/TD&gt;
&lt;TD&gt;2026-02-20 07:02:09+00&lt;/TD&gt;
&lt;TD&gt;1771570907959422701&lt;/TD&gt;
&lt;TD&gt;1771513244411&lt;/TD&gt;
&lt;TD&gt;NULL&lt;/TD&gt;
&lt;TD&gt;2026-02-20 06:47:18+00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So e.g. the first row: document `687a35b9606062c59c5a5428` was deleted in MongoDB and Stitch then sets `_sdc_deleted_at` correctly but it nulls `name`. The `name` value was there before the source document was deleted and that change was replicated.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 13:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Stitch/Do-not-null-destination-row-values-when-source-deleted/m-p/2543437#M143</guid>
      <dc:creator>paulmwatson</dc:creator>
      <dc:date>2026-02-20T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Do not null destination row values when source deleted</title>
      <link>https://community.qlik.com/t5/Stitch/Do-not-null-destination-row-values-when-source-deleted/m-p/2545367#M145</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336479"&gt;@paulmwatson&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;What you're seeing is actually expected behavior with log based CDC replication in Stitch.&lt;/P&gt;
&lt;P&gt;When a document is deleted in MongoDB the change stream only includes the document's _id and some metadata about the operation it doesn't include the full document fields (like name). Because of that, Stitch has no way to retain the previous values when processing a delete.&lt;/P&gt;
&lt;P&gt;As per the documentation, Stitch handles this by overwriting the existing row:&lt;/P&gt;
&lt;P&gt;The primary key (_id) is preserved&lt;/P&gt;
&lt;P&gt;_sdc_deleted_at is populated with the deletion timestamp&lt;/P&gt;
&lt;P&gt;All other columns are set to NULL&lt;/P&gt;
&lt;P&gt;So what you end up with is essentially a tombstone record it marks that the document was deleted, but it doesn't keep the original field values.&lt;/P&gt;
&lt;P&gt;At the moment, there isn't a configuration option in Stitch to change this behavior for log based replication.&lt;/P&gt;
&lt;P&gt;If retaining the field values after deletion is important for your use case, you could consider a couple of alternatives:&lt;/P&gt;
&lt;P&gt;Use soft deletes in MongoDB&lt;BR /&gt;Instead of deleting documents, add a field like deleted_at. This way, Stitch treats it as an update and keeps all the column values intact.&lt;/P&gt;
&lt;P&gt;Use a different replication method&lt;BR /&gt;Full-table replication can preserve values, but it comes with trade offs like higher load.&lt;/P&gt;
&lt;P&gt;This behavior is also described in the Stitch docs under Hard deletes with Log based Incremental:&lt;BR /&gt;&lt;A href="https://www.stitchdata.com/docs/replication/deleted-record-handling" target="_blank"&gt;https://www.stitchdata.com/docs/replication/deleted-record-handling&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps clarify things!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2026 14:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Stitch/Do-not-null-destination-row-values-when-source-deleted/m-p/2545367#M145</guid>
      <dc:creator>Soheb_Algur</dc:creator>
      <dc:date>2026-03-24T14:11:37Z</dc:date>
    </item>
  </channel>
</rss>

