<?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 Py4JJavaError when trying to write dataframe to delta table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15220#M9576</link>
    <description>&lt;P&gt;I'm trying to write a dataframe to a delta table and am getting this error.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/961iBC97F291BC9DD30D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;Im not sure what the issue is as I had no problem successfully writing other dataframes to delta tables. I attached a snippet of the data as well along with the schema:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/971i437DEC8AEE1AD77C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;﻿&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/976iB3CCCC94C9F971C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2022 05:45:46 GMT</pubDate>
    <dc:creator>AK98</dc:creator>
    <dc:date>2022-12-22T05:45:46Z</dc:date>
    <item>
      <title>Py4JJavaError when trying to write dataframe to delta table</title>
      <link>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15220#M9576</link>
      <description>&lt;P&gt;I'm trying to write a dataframe to a delta table and am getting this error.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/961iBC97F291BC9DD30D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;Im not sure what the issue is as I had no problem successfully writing other dataframes to delta tables. I attached a snippet of the data as well along with the schema:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/971i437DEC8AEE1AD77C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;﻿&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/976iB3CCCC94C9F971C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 05:45:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15220#M9576</guid>
      <dc:creator>AK98</dc:creator>
      <dc:date>2022-12-22T05:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Py4JJavaError when trying to write dataframe to delta table</title>
      <link>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15221#M9577</link>
      <description>&lt;P&gt;hey @Ashad Khan​&amp;nbsp;refer this link &lt;A href="https://bigdataprogrammers.com/write-dataframe-to-delta-table-in-databricks-with-overwrite-mode/" alt="https://bigdataprogrammers.com/write-dataframe-to-delta-table-in-databricks-with-overwrite-mode/" target="_blank"&gt;https://bigdataprogrammers.com/write-dataframe-to-delta-table-in-databricks-with-overwrite-mode/&lt;/A&gt; &lt;/P&gt;&lt;P&gt;that might help you , &lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 06:58:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15221#M9577</guid>
      <dc:creator>Rishabh-Pandey</dc:creator>
      <dc:date>2022-12-22T06:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Py4JJavaError when trying to write dataframe to delta table</title>
      <link>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15222#M9578</link>
      <description>&lt;P&gt;Does your delta tables contains all columns what your dataframe contains. If there is schema mismatch it might be a reason for failure.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.write.format("delta") \
           .option("mergeSchema", "true") \
           .mode("append") \
           .save(DELTALAKE_SILVER_PATH)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 09:20:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15222#M9578</guid>
      <dc:creator>ramravi</dc:creator>
      <dc:date>2022-12-22T09:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Py4JJavaError when trying to write dataframe to delta table</title>
      <link>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15224#M9580</link>
      <description>&lt;P&gt;My understanding was that I was writing to a brand new delta table that doesn't exist, and hence there would be no schema mismatch. I also tried the inferSchema option. Is that not the case? I did the same for other dataframes and it wasn't an issue&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 18:35:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/py4jjavaerror-when-trying-to-write-dataframe-to-delta-table/m-p/15224#M9580</guid>
      <dc:creator>AK98</dc:creator>
      <dc:date>2022-12-22T18:35:18Z</dc:date>
    </item>
  </channel>
</rss>

