<?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: Delta table - version number change on merge in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/delta-table-version-number-change-on-merge/m-p/50734#M28879</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Yes, this is the expected behavior. In Delta Lake, every operation, including MERGE, is atomic. This means that each operation is a transaction that can either succeed completely or fail; it cannot have partial success. Even if the MERGE operation doesn't result in any changes to the target table, it is still considered a transaction and thus increments the table version.&lt;/SPAN&gt;&lt;SPAN&gt;When a MERGE operation is performed, Delta Lake performs several steps:&lt;/SPAN&gt;&lt;SPAN&gt;1. It identifies the rows in the source data that match the condition specified in the MERGE statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. It applies the update, delete, or insert actions to the matched and not-matched source and target rows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. It writes out the result as a new version of the target Delta table.&lt;/SPAN&gt;&lt;SPAN&gt;Even if no rows are updated, deleted, or inserted, these steps are still performed, and the result is written out as a new version of the target Delta table. This is why the table version is incremented even if nothing is updated in the target table.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2023 10:59:00 GMT</pubDate>
    <dc:creator>Sidhant07</dc:creator>
    <dc:date>2023-11-09T10:59:00Z</dc:date>
    <item>
      <title>Delta table - version number change on merge</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-table-version-number-change-on-merge/m-p/48674#M28359</link>
      <description>&lt;P&gt;I am running a merge with pyspark on a delta table in which nothing is getting updated in the target table. Still target table version is incremented when I check the table history. Is that expected behavior?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2023 21:31:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-table-version-number-change-on-merge/m-p/48674#M28359</guid>
      <dc:creator>SKC01</dc:creator>
      <dc:date>2023-10-07T21:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delta table - version number change on merge</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-table-version-number-change-on-merge/m-p/50734#M28879</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Yes, this is the expected behavior. In Delta Lake, every operation, including MERGE, is atomic. This means that each operation is a transaction that can either succeed completely or fail; it cannot have partial success. Even if the MERGE operation doesn't result in any changes to the target table, it is still considered a transaction and thus increments the table version.&lt;/SPAN&gt;&lt;SPAN&gt;When a MERGE operation is performed, Delta Lake performs several steps:&lt;/SPAN&gt;&lt;SPAN&gt;1. It identifies the rows in the source data that match the condition specified in the MERGE statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. It applies the update, delete, or insert actions to the matched and not-matched source and target rows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. It writes out the result as a new version of the target Delta table.&lt;/SPAN&gt;&lt;SPAN&gt;Even if no rows are updated, deleted, or inserted, these steps are still performed, and the result is written out as a new version of the target Delta table. This is why the table version is incremented even if nothing is updated in the target table.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 10:59:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-table-version-number-change-on-merge/m-p/50734#M28879</guid>
      <dc:creator>Sidhant07</dc:creator>
      <dc:date>2023-11-09T10:59:00Z</dc:date>
    </item>
  </channel>
</rss>

