<?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: How to load all the previous day's data only into the newly added column of the existing delta t in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130332#M48759</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/149095"&gt;@shan-databricks&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;There is no out of the box mechanism to do that. You need to implement your own custom logic to handle that scenario.&lt;/P&gt;&lt;P&gt;There are some thing in delta protocol that can make your life easier like schema evolution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Schema evolution allows you to resolve schema mismatches between the target and source table in merge. It handles the following two cases:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;A column exists in the source table but not the target table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That column will be added to the target schema, and its values will be populated from the corresponding column in the source.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;This only applies when the column name and structure in the merge source exactly match the target assignment.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The new column must be directly assigned from the source, without expressions, renaming, or transformations.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;A column exists in the target table but not the source table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The target schema is not changed. These columns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Are left unchanged for&lt;SPAN&gt; UPDATE SET *.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are set to&amp;nbsp;NULL&amp;nbsp;for&amp;nbsp;INSERT *.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;May still be explicitly modified if assigned in the action clause.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still you have to write logic that will update older records, because they will contain NULL values.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Sep 2025 08:49:10 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2025-09-01T08:49:10Z</dc:date>
    <item>
      <title>How to load all the previous day's data only into the newly added column of the existing delta table</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130310#M48748</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How to load all the previous day's data only into the newly added column of the existing delta table? Is there any option available to do that without writing any logic?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 06:59:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130310#M48748</guid>
      <dc:creator>shan-databricks</dc:creator>
      <dc:date>2025-09-01T06:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the previous day's data only into the newly added column of the existing delta t</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130332#M48759</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/149095"&gt;@shan-databricks&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;There is no out of the box mechanism to do that. You need to implement your own custom logic to handle that scenario.&lt;/P&gt;&lt;P&gt;There are some thing in delta protocol that can make your life easier like schema evolution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Schema evolution allows you to resolve schema mismatches between the target and source table in merge. It handles the following two cases:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;A column exists in the source table but not the target table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That column will be added to the target schema, and its values will be populated from the corresponding column in the source.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;This only applies when the column name and structure in the merge source exactly match the target assignment.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The new column must be directly assigned from the source, without expressions, renaming, or transformations.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;A column exists in the target table but not the source table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The target schema is not changed. These columns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Are left unchanged for&lt;SPAN&gt; UPDATE SET *.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are set to&amp;nbsp;NULL&amp;nbsp;for&amp;nbsp;INSERT *.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;May still be explicitly modified if assigned in the action clause.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still you have to write logic that will update older records, because they will contain NULL values.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 08:49:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130332#M48759</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-01T08:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the previous day's data only into the newly added column of the existing delta t</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130333#M48760</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/149095"&gt;@shan-databricks&lt;/a&gt;&amp;nbsp;there's certainly ways for the schema to evolve within your delta tables that's supported out of the box:&amp;nbsp;&lt;A href="https://docs.databricks.com/aws/en/delta/update-schema#enable-schema-evolution" target="_blank" rel="noopener"&gt;https://docs.databricks.com/aws/en/delta/update-schema#enable-schema-evolution&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To update older records, they'd likely have NULL values in the new column. You could use an UPDATE statement as a one-off to populate them. You could also look into a MERGE statement that is very flexible &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/delta-merge-into#when-matched" target="_blank"&gt;https://docs.databricks.com/aws/en/sql/language-manual/delta-merge-into#when-matched&lt;/A&gt; . This part requires you to write some logic. If you're not confident, you could always use AI + the Databricks Free Edition to practice on in your own environment before implementing it on the real thing.&lt;/P&gt;&lt;P&gt;All the best,&lt;BR /&gt;BS&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 08:46:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/130333#M48760</guid>
      <dc:creator>BS_THE_ANALYST</dc:creator>
      <dc:date>2025-09-01T08:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the previous day's data only into the newly added column of the existing delta t</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/133133#M49730</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/149095"&gt;@shan-databricks&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;Did the suggestions shared above help resolve your concern? If so, please consider marking one of the responses as the accepted solution. If you found a different approach that worked for you, it would be great if you could share it with the community as well.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Sep 2025 09:44:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-load-all-the-previous-day-s-data-only-into-the-newly/m-p/133133#M49730</guid>
      <dc:creator>Advika</dc:creator>
      <dc:date>2025-09-27T09:44:11Z</dc:date>
    </item>
  </channel>
</rss>

