<?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 Issue with create_auto_cdc_flow Not Updating Business Columns for DELETE Events in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/issue-with-create-auto-cdc-flow-not-updating-business-columns/m-p/152789#M53878</link>
    <description>&lt;DIV&gt;We 're currently&amp;nbsp;working with Databricks AUTO CDC in a data pipeline and have encountered an issue with create_auto_cdc_flow (AUTO CDC) when using SCD Type 2.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We are using the following configuration:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;stored_as_scd_type = 2&lt;/DIV&gt;&lt;DIV&gt;apply_as_deletes = expr("operation = 'DELETE'")&lt;/DIV&gt;&lt;DIV&gt;sequence_by = date_extraction&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Target is a streaming table created via create_streaming_table&lt;/DIV&gt;&lt;DIV&gt;Our source data includes an operation column (INSERT, UPDATE, DELETE) and business fields such as account_close_dt (end date of account).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Observed Behavior&lt;/DIV&gt;&lt;DIV&gt;When a record arrives with:&lt;/DIV&gt;&lt;DIV&gt;operation = 'DELETE'&lt;/DIV&gt;&lt;DIV&gt;and a populated business field (e.g., account_close_dt )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We observe that:&lt;/DIV&gt;&lt;DIV&gt;The existing SCD2 record is closed (__END_AT is set correctly)&lt;/DIV&gt;&lt;DIV&gt;However, business columns such as account_close_dt are NOT updated in the target table&lt;/DIV&gt;&lt;DIV&gt;This results in loss of important business information associated with the closing event.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Expected Behavior&lt;/DIV&gt;&lt;DIV&gt;For our use case, we expect that:&lt;/DIV&gt;&lt;DIV&gt;When a "DELETE" event contains updated business fields (e.g., account closure date),&lt;/DIV&gt;&lt;DIV&gt;Those fields should be reflected in the closing record&lt;/DIV&gt;&lt;DIV&gt;Currently, neither occurs — only __END_AT is updated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Key Question&lt;/DIV&gt;&lt;DIV&gt;Is this behavior expected when using apply_as_deletes?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Specifically:&lt;/DIV&gt;&lt;DIV&gt;When an event matches apply_as_deletes, is it always treated as a pure delete (i.e., only closing the record), ignoring all other column updates?&lt;/DIV&gt;&lt;DIV&gt;Is there any supported way within create_auto_cdc_flow to:&lt;/DIV&gt;&lt;DIV&gt;propagate business column updates along with delete events?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would appreciate guidance on best practices for this pattern when using AUTO CDC.&lt;/DIV&gt;</description>
    <pubDate>Tue, 31 Mar 2026 18:55:07 GMT</pubDate>
    <dc:creator>kevinzhang29</dc:creator>
    <dc:date>2026-03-31T18:55:07Z</dc:date>
    <item>
      <title>Issue with create_auto_cdc_flow Not Updating Business Columns for DELETE Events</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-create-auto-cdc-flow-not-updating-business-columns/m-p/152789#M53878</link>
      <description>&lt;DIV&gt;We 're currently&amp;nbsp;working with Databricks AUTO CDC in a data pipeline and have encountered an issue with create_auto_cdc_flow (AUTO CDC) when using SCD Type 2.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We are using the following configuration:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;stored_as_scd_type = 2&lt;/DIV&gt;&lt;DIV&gt;apply_as_deletes = expr("operation = 'DELETE'")&lt;/DIV&gt;&lt;DIV&gt;sequence_by = date_extraction&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Target is a streaming table created via create_streaming_table&lt;/DIV&gt;&lt;DIV&gt;Our source data includes an operation column (INSERT, UPDATE, DELETE) and business fields such as account_close_dt (end date of account).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Observed Behavior&lt;/DIV&gt;&lt;DIV&gt;When a record arrives with:&lt;/DIV&gt;&lt;DIV&gt;operation = 'DELETE'&lt;/DIV&gt;&lt;DIV&gt;and a populated business field (e.g., account_close_dt )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We observe that:&lt;/DIV&gt;&lt;DIV&gt;The existing SCD2 record is closed (__END_AT is set correctly)&lt;/DIV&gt;&lt;DIV&gt;However, business columns such as account_close_dt are NOT updated in the target table&lt;/DIV&gt;&lt;DIV&gt;This results in loss of important business information associated with the closing event.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Expected Behavior&lt;/DIV&gt;&lt;DIV&gt;For our use case, we expect that:&lt;/DIV&gt;&lt;DIV&gt;When a "DELETE" event contains updated business fields (e.g., account closure date),&lt;/DIV&gt;&lt;DIV&gt;Those fields should be reflected in the closing record&lt;/DIV&gt;&lt;DIV&gt;Currently, neither occurs — only __END_AT is updated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Key Question&lt;/DIV&gt;&lt;DIV&gt;Is this behavior expected when using apply_as_deletes?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Specifically:&lt;/DIV&gt;&lt;DIV&gt;When an event matches apply_as_deletes, is it always treated as a pure delete (i.e., only closing the record), ignoring all other column updates?&lt;/DIV&gt;&lt;DIV&gt;Is there any supported way within create_auto_cdc_flow to:&lt;/DIV&gt;&lt;DIV&gt;propagate business column updates along with delete events?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would appreciate guidance on best practices for this pattern when using AUTO CDC.&lt;/DIV&gt;</description>
      <pubDate>Tue, 31 Mar 2026 18:55:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-create-auto-cdc-flow-not-updating-business-columns/m-p/152789#M53878</guid>
      <dc:creator>kevinzhang29</dc:creator>
      <dc:date>2026-03-31T18:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with create_auto_cdc_flow Not Updating Business Columns for DELETE Events</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-create-auto-cdc-flow-not-updating-business-columns/m-p/152841#M53886</link>
      <description>&lt;P class=""&gt;Operation type &lt;STRONG&gt;DELETE&lt;/STRONG&gt; means the record is supposed to disappear. If you were using SCD Type 1, the record would be removed from the silver table. When using SCD Type 2, AUTO CDC only updates the lifecycle metadata columns to make the record inactive; it does nothing to any other business columns.&lt;/P&gt;&lt;P class=""&gt;For your use case, the only option is to convert the DELETE operation into an UPDATE operation &lt;STRONG&gt;before&lt;/STRONG&gt; it reaches the AUTO CDC logic. If you have a view between your bronze and silver layers, you can use that view to add custom logic that checks:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;if the business key column is not null, and&lt;/LI&gt;&lt;LI&gt;the operation type is DELETE,&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;then change the operation type to UPDATE. You might also want to add another flag that records that the original operation type was DELETE.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 01:45:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-create-auto-cdc-flow-not-updating-business-columns/m-p/152841#M53886</guid>
      <dc:creator>pradeep_singh</dc:creator>
      <dc:date>2026-04-01T01:45:50Z</dc:date>
    </item>
  </channel>
</rss>

