<?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: OPTIMIZE throws an error after doing MERGE on the table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/optimize-throws-an-error-after-doing-merge-on-the-table/m-p/29959#M21646</link>
    <description>&lt;UL&gt;&lt;LI&gt;You can try to change isolation level:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/delta/optimizations/isolation-level" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/delta/optimizations/isolation-level&lt;/A&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In merge is good to specify all partitions in merge conditions.&lt;/LI&gt;&lt;LI&gt;It can also happen when script is running concurrently.&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Wed, 02 Feb 2022 14:37:00 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-02-02T14:37:00Z</dc:date>
    <item>
      <title>OPTIMIZE throws an error after doing MERGE on the table</title>
      <link>https://community.databricks.com/t5/data-engineering/optimize-throws-an-error-after-doing-merge-on-the-table/m-p/29957#M21644</link>
      <description>&lt;P&gt;I have a table on which I do upsert i.e. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MERGE INTO table_name ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After which I run &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPTIMIZE table_name&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Which throws an error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;java.util.concurrent.ExecutionException: io.delta.exceptions.ConcurrentDeleteReadException: This transaction attempted to read one or more files that were deleted (for example part-00000-50e8fcea-1314-445b-a4fd-a7b61a9bf02c-c000.snappy.parquet in the root of the table) by a concurrent update. Please try the operation again.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Not sure, what's happening as I am not deleting any files. Is there a way to fix this?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 02:58:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/optimize-throws-an-error-after-doing-merge-on-the-table/m-p/29957#M21644</guid>
      <dc:creator>Constantine</dc:creator>
      <dc:date>2022-02-02T02:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: OPTIMIZE throws an error after doing MERGE on the table</title>
      <link>https://community.databricks.com/t5/data-engineering/optimize-throws-an-error-after-doing-merge-on-the-table/m-p/29959#M21646</link>
      <description>&lt;UL&gt;&lt;LI&gt;You can try to change isolation level:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/delta/optimizations/isolation-level" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/delta/optimizations/isolation-level&lt;/A&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In merge is good to specify all partitions in merge conditions.&lt;/LI&gt;&lt;LI&gt;It can also happen when script is running concurrently.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 02 Feb 2022 14:37:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/optimize-throws-an-error-after-doing-merge-on-the-table/m-p/29959#M21646</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-02-02T14:37:00Z</dc:date>
    </item>
  </channel>
</rss>

