<?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 AUTO CDC FROM SNAPSHOT schema evolution in history tracking columns in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168629#M55953</link>
    <description>&lt;P&gt;Does the&amp;nbsp;&lt;EM&gt;create_auto_cdc_from_snapshot_flow()&lt;/EM&gt; allow for expansion of included columns in&amp;nbsp;track_history_column_list&lt;SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;track_history_except_column_list&amp;nbsp;without doing a full refresh?&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intended flow is:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Bronze - Managed ingestion of table (scd 1) using Dynamics 365 connector as an example of one source, current state table&lt;/LI&gt;&lt;LI&gt;Silver - MV as a staging table for initial transformation, current state table&lt;/LI&gt;&lt;LI&gt;Silver - MV as a conformed entity table consolidating different sources (conformed_customer, conformed_order etc.), current state table&lt;/LI&gt;&lt;LI&gt;Silver - Streaming table with history of 3. (SCD 2) for tables like &lt;EM&gt;conformed_customer_history&lt;/EM&gt; based on specific columns&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Since 3. is a current state table,&amp;nbsp;&lt;EM&gt;create_auto_cdc_from_snapshot_flow()&lt;/EM&gt; seems fitting. Documentation seems rather unclear whether or not schema evolution and specifically expanding tracking columns forces a full refresh of the target table, resulting in loss of historic data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an example. Let's pretend we introduce the column&amp;nbsp;&lt;STRONG&gt;region&lt;/STRONG&gt; to the &lt;EM&gt;confomed_customer&lt;/EM&gt;. Could we expand &lt;EM&gt;conformed_customer_history&amp;nbsp;&lt;/EM&gt;to include the region column, with existing rows being assigned NULL and future ones being inserted, as well as alter the tracking list to include the new region column for historization?&lt;BR /&gt;&lt;BR /&gt;The D365 connector does provide SCD type 2 output, however, we want to be able and define which columns are tracked. Schema evolution for the connector is also in private preview and isn't relevant for us in current production.&amp;nbsp;&lt;BR /&gt;Going down the AutoLoader path for D365 is possible, but seeing as we conform different sources downstream with different setup&amp;nbsp;&lt;EM&gt;create_auto_cdc_from_snapshot_flow()&amp;nbsp;&lt;/EM&gt;is most relevant.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2026 09:33:04 GMT</pubDate>
    <dc:creator>carl_hsg</dc:creator>
    <dc:date>2026-09-15T09:33:04Z</dc:date>
    <item>
      <title>AUTO CDC FROM SNAPSHOT schema evolution in history tracking columns</title>
      <link>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168629#M55953</link>
      <description>&lt;P&gt;Does the&amp;nbsp;&lt;EM&gt;create_auto_cdc_from_snapshot_flow()&lt;/EM&gt; allow for expansion of included columns in&amp;nbsp;track_history_column_list&lt;SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;track_history_except_column_list&amp;nbsp;without doing a full refresh?&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intended flow is:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Bronze - Managed ingestion of table (scd 1) using Dynamics 365 connector as an example of one source, current state table&lt;/LI&gt;&lt;LI&gt;Silver - MV as a staging table for initial transformation, current state table&lt;/LI&gt;&lt;LI&gt;Silver - MV as a conformed entity table consolidating different sources (conformed_customer, conformed_order etc.), current state table&lt;/LI&gt;&lt;LI&gt;Silver - Streaming table with history of 3. (SCD 2) for tables like &lt;EM&gt;conformed_customer_history&lt;/EM&gt; based on specific columns&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Since 3. is a current state table,&amp;nbsp;&lt;EM&gt;create_auto_cdc_from_snapshot_flow()&lt;/EM&gt; seems fitting. Documentation seems rather unclear whether or not schema evolution and specifically expanding tracking columns forces a full refresh of the target table, resulting in loss of historic data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an example. Let's pretend we introduce the column&amp;nbsp;&lt;STRONG&gt;region&lt;/STRONG&gt; to the &lt;EM&gt;confomed_customer&lt;/EM&gt;. Could we expand &lt;EM&gt;conformed_customer_history&amp;nbsp;&lt;/EM&gt;to include the region column, with existing rows being assigned NULL and future ones being inserted, as well as alter the tracking list to include the new region column for historization?&lt;BR /&gt;&lt;BR /&gt;The D365 connector does provide SCD type 2 output, however, we want to be able and define which columns are tracked. Schema evolution for the connector is also in private preview and isn't relevant for us in current production.&amp;nbsp;&lt;BR /&gt;Going down the AutoLoader path for D365 is possible, but seeing as we conform different sources downstream with different setup&amp;nbsp;&lt;EM&gt;create_auto_cdc_from_snapshot_flow()&amp;nbsp;&lt;/EM&gt;is most relevant.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2026 09:33:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168629#M55953</guid>
      <dc:creator>carl_hsg</dc:creator>
      <dc:date>2026-09-15T09:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: AUTO CDC FROM SNAPSHOT schema evolution in history tracking columns</title>
      <link>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168630#M55954</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/255079"&gt;@carl_hsg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I tested expanding &lt;STRONG&gt;track_history_column_list&lt;/STRONG&gt; on an existing SCD2 target and it did not require a full refresh in my test.&lt;/P&gt;&lt;P&gt;The part that seems unclear in the docs is what happens when you expand the tracking list or introduce a new column after the SCD2 target already contains history.&lt;/P&gt;&lt;P&gt;I did a quick validation too of that exact scenario with &lt;STRONG&gt;create_auto_cdc_from_snapshot_flow&lt;/STRONG&gt;().&lt;/P&gt;&lt;P&gt;Started with:&amp;nbsp;&lt;STRONG&gt;track_history_column_list=["name"]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;then expanded it to:&amp;nbsp;&lt;STRONG&gt;track_history_column_list=["name", "region"]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Existing SCD2 history was preserved and subsequent changes to region created new SCD2 versions without requiring a full refresh.&lt;/P&gt;&lt;P&gt;Also tested adding a completely new source column (&lt;STRONG&gt;segment&lt;/STRONG&gt;). What I observed is below:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;existing SCD2 history was preserved&lt;/LI&gt;&lt;LI&gt;no full refresh was required&lt;/LI&gt;&lt;LI&gt;the new column was added to the target schema (schema evolved)&lt;/LI&gt;&lt;LI&gt;older historical rows had NULL for the new column&lt;/LI&gt;&lt;LI&gt;current rows picked up the new value&lt;/LI&gt;&lt;LI&gt;after adding the new column (segment) to &lt;STRONG&gt;track_history_column_list&lt;/STRONG&gt;, future changes to it created new SCD2 versions.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So for the scenario you described: adding region, keeping old history as NULL and then historizing future region changes, it worked as expected in my test.&lt;/P&gt;&lt;P&gt;Let me know if this helps and post here for any other questions on it.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2026 10:14:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168630#M55954</guid>
      <dc:creator>data_pulse</dc:creator>
      <dc:date>2026-09-15T10:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: AUTO CDC FROM SNAPSHOT schema evolution in history tracking columns</title>
      <link>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168638#M55959</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Adding a column and changing the history-tracking configuration need separate checks.&lt;/STRONG&gt; Databricks describes adding columns as generally safe without a full refresh:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;FONT size="3"&gt;&lt;EM&gt;"Plan your schema to avoid changes that require a full refresh. Adding columns is generally safe, while modifying existing columns or partitioning schemes typically requires recomputing the table."&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, the snapshot API reference does not explicitly guarantee changing the tracking list on an already populated SCD2 target without rebuilding it. I wouldn't give an unconditional "yes" based on the documentation alone.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For region, the configuration is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Add it to &lt;EM&gt;track_history_column_list&lt;/EM&gt;, retaining your existing tracked columns. If you use &lt;EM&gt;track_history_except_column_list&lt;/EM&gt;, keep &lt;EM&gt;region&lt;/EM&gt; &lt;STRONG&gt;out&lt;/STRONG&gt; of that list. The latter excludes columns from history tracking, not from the output table. The &lt;A href="https://docs.databricks.com/aws/en/ldp/developer/ldp-python-ref-apply-changes-from-snapshot" target="_blank" rel="noopener"&gt;snapshot API reference&lt;/A&gt; explains both options.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Protect the history before making the change.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A full refresh clears the streaming target and its checkpoints. Your current-state materialized view alone cannot reconstruct the customer versions that have already disappeared from it. See the &lt;A href="https://docs.databricks.com/aws/en/ldp/updates#when-to-use-a-full-refresh" target="_blank" rel="noopener"&gt;refresh documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Add&lt;EM&gt; pipelines.reset.allowed=false&lt;/EM&gt; to your existing target declaration, preserving its other settings and table properties:&lt;/P&gt;&lt;PRE&gt;from pyspark import pipelines as dp

dp.create_streaming_table(
    name="conformed_customer_history",
    table_properties={
        "pipelines.reset.allowed": "false",
        # Retain your other table properties here.
    },
)&lt;/PRE&gt;&lt;P&gt;This prevents full refreshes of that table. It does &lt;STRONG&gt;not&lt;/STRONG&gt; enable schema evolution or make an incompatible change supported. The property is documented in the &lt;A href="https://docs.databricks.com/aws/en/ldp/properties#pipeline-table-properties" target="_blank" rel="noopener"&gt;pipeline properties reference&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test the transition on a non-production target that already contains history.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Check that previously closed versions remain unchanged with &lt;EM&gt;region=NULL&lt;/EM&gt;. Pay particular attention to the first snapshot containing a non-null &lt;EM&gt;region&lt;/EM&gt;: does it close the existing active version and create another, or populate the active version in place? Then change only &lt;EM&gt;region&lt;/EM&gt; and check for a new version; repeat an unchanged snapshot and check that none is added.&lt;/P&gt;&lt;P&gt;That first snapshot is the important boundary in your example. Successful subsequent tracking would not, by itself, establish that introducing the column preserved the history exactly as you intended.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2026 10:57:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/auto-cdc-from-snapshot-schema-evolution-in-history-tracking/m-p/168638#M55959</guid>
      <dc:creator>ivanvyd</dc:creator>
      <dc:date>2026-09-15T10:57:06Z</dc:date>
    </item>
  </channel>
</rss>

