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

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now