Thansk Palash, ur suggestion put me on the right track
Reading works fine, however it seems that in writng, as the sparkSession is
not involved, then the connector does not know where to write
had to replace my writing code with this
MongoSpark.save(df.write.option("spark.mongodb.output.uri",
"mon
Uh. Many thanksWill try it out
On 17 Jan 2017 6:47 am, "Palash Gupta" wrote:
> Hi Marco,
>
> What is the user and password you are using for mongodb connection? Did
> you enable authorization?
>
> Better to include user & pass in mongo url.
>
> I remember I tested with python successfully.
>
Hi,
Example:
dframe =
sqlContext.read.format("com.mongodb.spark.sql.DefaultSource").option("spark.mongodb.input.uri",
"
mongodb://user:pass@172.26.7.192:27017/db_name.collection_name").load()dframe.printSchema()
One more thing if you create one db in mongo, please create a collection with a
rec
Hi Marco,
What is the user and password you are using for mongodb connection? Did you
enable authorization?
Better to include user & pass in mongo url.
I remember I tested with python successfully.
Best Regards,Palash
Sent from Yahoo Mail on Android
On Tue, 17 Jan, 2017 at 5:37 am, Marco Mis