cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Loading spark dataframe to Mongo collection isn't allowing nulls

vishwanath_1
New Contributor III
I am using below command to push DataFrame to Mongo Collection.
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)
 
inputproddata.write.format("mongo").option("spark.mongodb.output.uri", connectionString).option("database",database).option("collection",collection).option("ignoreNullValues", false).mode("append").save()
 
Please let me know why this option does not work and suggest for any alternative solution 
1 REPLY 1

First approach works.. Thanks

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group