<?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: Loading spark dataframe to Mongo collection isn't allowing nulls in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/loading-spark-dataframe-to-mongo-collection-isn-t-allowing-nulls/m-p/63685#M32318</link>
    <description>&lt;P&gt;First approach works.. Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 12:11:05 GMT</pubDate>
    <dc:creator>vishwanath_1</dc:creator>
    <dc:date>2024-03-14T12:11:05Z</dc:date>
    <item>
      <title>Loading spark dataframe to Mongo collection isn't allowing nulls</title>
      <link>https://community.databricks.com/t5/data-engineering/loading-spark-dataframe-to-mongo-collection-isn-t-allowing-nulls/m-p/62047#M31885</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am using below command to push DataFrame to Mongo Collection.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;There are few null values in String and Double datatype columns , we see these are getting missed when pushed to mongo even after using the option("ignoreNullValues", false)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;inputproddata.write.format(&lt;/SPAN&gt;&lt;SPAN&gt;"mongo"&lt;/SPAN&gt;&lt;SPAN&gt;).option(&lt;/SPAN&gt;&lt;SPAN&gt;"spark.mongodb.output.uri"&lt;/SPAN&gt;&lt;SPAN&gt;, connectionString).option(&lt;/SPAN&gt;&lt;SPAN&gt;"database"&lt;/SPAN&gt;&lt;SPAN&gt;,database).option(&lt;/SPAN&gt;&lt;SPAN&gt;"collection"&lt;/SPAN&gt;&lt;SPAN&gt;,collection).option(&lt;/SPAN&gt;&lt;SPAN&gt;"ignoreNullValues"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;).mode(&lt;/SPAN&gt;&lt;SPAN&gt;"append"&lt;/SPAN&gt;&lt;SPAN&gt;).save()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please let me know why this option does not work and suggest for any alternative solution&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Feb 2024 03:14:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/loading-spark-dataframe-to-mongo-collection-isn-t-allowing-nulls/m-p/62047#M31885</guid>
      <dc:creator>vishwanath_1</dc:creator>
      <dc:date>2024-02-27T03:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loading spark dataframe to Mongo collection isn't allowing nulls</title>
      <link>https://community.databricks.com/t5/data-engineering/loading-spark-dataframe-to-mongo-collection-isn-t-allowing-nulls/m-p/63685#M32318</link>
      <description>&lt;P&gt;First approach works.. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 12:11:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/loading-spark-dataframe-to-mongo-collection-isn-t-allowing-nulls/m-p/63685#M32318</guid>
      <dc:creator>vishwanath_1</dc:creator>
      <dc:date>2024-03-14T12:11:05Z</dc:date>
    </item>
  </channel>
</rss>

