<?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: DLT Apply Changes problem in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117484#M45506</link>
    <description>&lt;P&gt;I cannot send the exact error log, but here's a high level of that:&lt;BR /&gt;[DELTA_SCHEMA_CHANGED_WITH_STARTING_OPTIONS] Detected schema change in version 6:\nstreaming source schema: root\n&lt;/P&gt;&lt;P&gt;I want to know, how can i handle tables, which has a last modified date, currently i am using dlt.apply_changes function for this, where i am forcing my delta table as a streaming source and then writing in a streaming table as my target. But this throws errors.&lt;/P&gt;&lt;P&gt;Is there any other way to do this? If yes, then please tell. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 02 May 2025 08:13:23 GMT</pubDate>
    <dc:creator>_singh_vish</dc:creator>
    <dc:date>2025-05-02T08:13:23Z</dc:date>
    <item>
      <title>DLT Apply Changes problem</title>
      <link>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117428#M45493</link>
      <description>&lt;P&gt;Hi All, I am working on DLT pipeline, to create SCD2 for my bronze layer, my architecture has 4 layers, namely Raw, Bronze, Silver, Gold. I am ingesting data directly into raw, and then I am creating history(SCD2) into bronze.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.view(name=source_name)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; def source():&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spark.readStream.format("delta")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .option("readChangeData", "true")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .option("startingVersion", 0)&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .option("mergeSchema", "true")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .table(source_table_location)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .select(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *[col(source_col).alias(target_col) for source_col, target_col in alias_config.items()]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; # Defining the target table for SCD2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; dlt.create_streaming_table(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name=target_table_name&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; dlt.apply_changes(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; target=target_table_name,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; source=source_name,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keys=keys,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequence_by=col(last_updated_column),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; track_history_except_column_list=track_history_except_column_list,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stored_as_scd_type="2",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; apply_as_deletes=col(deleted_flag) == True if deleted_flag else False&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ) &amp;nbsp;&lt;/P&gt;&lt;P&gt;when the run the pipeline, it shows DLT does not support schema evolution, and other similar errors related to schema being changed somehow.&lt;BR /&gt;Is there a way to resolve this?&lt;BR /&gt;Also, even though the data is in delta table as batch upload, but it has last modified date available.&lt;/P&gt;&lt;P&gt;Can someone help?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H3 id="delta_schema_changed_with_starting_options"&gt;DELTA_SCHEMA_CHANGED_WITH_STARTING_OPTIONS(The error code)&lt;/H3&gt;</description>
      <pubDate>Thu, 01 May 2025 17:04:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117428#M45493</guid>
      <dc:creator>_singh_vish</dc:creator>
      <dc:date>2025-05-01T17:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: DLT Apply Changes problem</title>
      <link>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117462#M45504</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163028"&gt;@_singh_vish&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide some error-logs/messages?&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 04:03:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117462#M45504</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2025-05-02T04:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: DLT Apply Changes problem</title>
      <link>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117484#M45506</link>
      <description>&lt;P&gt;I cannot send the exact error log, but here's a high level of that:&lt;BR /&gt;[DELTA_SCHEMA_CHANGED_WITH_STARTING_OPTIONS] Detected schema change in version 6:\nstreaming source schema: root\n&lt;/P&gt;&lt;P&gt;I want to know, how can i handle tables, which has a last modified date, currently i am using dlt.apply_changes function for this, where i am forcing my delta table as a streaming source and then writing in a streaming table as my target. But this throws errors.&lt;/P&gt;&lt;P&gt;Is there any other way to do this? If yes, then please tell. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 08:13:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117484#M45506</guid>
      <dc:creator>_singh_vish</dc:creator>
      <dc:date>2025-05-02T08:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: DLT Apply Changes problem</title>
      <link>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117489#M45507</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_singh_vish_0-1746175727429.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16417i79000BE1BFF8D23D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_singh_vish_0-1746175727429.png" alt="_singh_vish_0-1746175727429.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_singh_vish_1-1746175741863.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16418iBC90B264CAC955E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="_singh_vish_1-1746175741863.png" alt="_singh_vish_1-1746175741863.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the table history, and it breaks on version 6, and also on version 8,&amp;nbsp;&lt;BR /&gt;I have not checked other versions after 8, but will expect a similar result for those too.&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 08:51:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dlt-apply-changes-problem/m-p/117489#M45507</guid>
      <dc:creator>_singh_vish</dc:creator>
      <dc:date>2025-05-02T08:51:34Z</dc:date>
    </item>
  </channel>
</rss>

