<?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: MetadataChangedException Exception  in databricks in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3100#M78</link>
    <description>&lt;P&gt;Can you share a sample code? &lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 13:03:46 GMT</pubDate>
    <dc:creator>Sandeep</dc:creator>
    <dc:date>2023-06-14T13:03:46Z</dc:date>
    <item>
      <title>MetadataChangedException Exception  in databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3099#M77</link>
      <description>&lt;P&gt;Reading around 20 text files from ADLS, doing some transformations, and after that these files are written back to ADLS as a single delta file (all operations are in parallel through the thread pool). Here from 20 threads, it is writing to a single file, using dataframe.append method. and getting the below error, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Exception type : MetadataChangedException&amp;nbsp;Exception message : The metadata of the Delta table has been changed by a concurrent update. Please try the operation again. ,operation:WRITE,operationParameters:{mode:Append,partitionBy:[]} readVersion:0,isolationLevel:WriteSerializable,isBlindAppend:true,operationMetrics:{numFiles:20,numOutputRows:1650135,numOutputBytes:80649658}} Refer to &lt;A href="https://docs.microsoft.com/azure/databricks/delta/concurrency-control" target="test_blank"&gt;https://docs.microsoft.com/azure/databricks/delta/concurrency-control&lt;/A&gt; for more details"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an INSERT operation, hence should be treated as blind INSERTS and the default isolation level, then why I am getting the concurrent update/metadata change exception here? Any idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:46:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3099#M77</guid>
      <dc:creator>thushar</dc:creator>
      <dc:date>2023-06-14T12:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: MetadataChangedException Exception  in databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3100#M78</link>
      <description>&lt;P&gt;Can you share a sample code? &lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 13:03:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3100#M78</guid>
      <dc:creator>Sandeep</dc:creator>
      <dc:date>2023-06-14T13:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: MetadataChangedException Exception  in databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3101#M79</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;df.write.format("delta")\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.mode('append')\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.option("overwriteSchema",False)\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.option("mergeSchema",True)\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.save(/mnt/r/xyz.delta)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 13:33:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/3101#M79</guid>
      <dc:creator>thushar</dc:creator>
      <dc:date>2023-06-14T13:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: MetadataChangedException Exception  in databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/42869#M2111</link>
      <description>&lt;P&gt;I have seen this problem with Identity column causing concurrency issues. But you seem to be getting similar error when writing to files. I don't know completely know your use case completely here, but would advice retrying this operation by managing the MetadataException in a try except block. Let us know what solved the problem?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 13:34:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/42869#M2111</guid>
      <dc:creator>naga_databricks</dc:creator>
      <dc:date>2023-08-30T13:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: MetadataChangedException Exception  in databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/110729#M3970</link>
      <description>&lt;P&gt;How can we import the exception "&lt;SPAN&gt;MetadataChangedException&lt;/SPAN&gt;"?&lt;BR /&gt;Or does Databricks recommend to catch / except Exception and parse the string?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 11:12:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/metadatachangedexception-exception-in-databricks/m-p/110729#M3970</guid>
      <dc:creator>jkb7</dc:creator>
      <dc:date>2025-02-20T11:12:17Z</dc:date>
    </item>
  </channel>
</rss>

