Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Under Review
Created by Guest
Created on Jun 30, 2020

Add MongoSparkHelper native support for pyspark

I went through Mongo spark connector python documentation but the thing which I could not find in python documentation was "MongoSpark Helper" section which is available in scala and java documentation. I was wondering if there is a way to use it in python code after adding the mongo spark connector packages. A sample code to demonstrate what is available and what I am looking for (this code is in scala and I am looking for a similar behavior in python) Code in use: sparkSession.read.format("mongo").option("uri", "mongodb://dummymongo:27017") Code looking for: MongoSpark.builder().connector(connector_with_custom_client_factory) .sparkSession(sparkSession).readConfig(dummyReadConfig).build().toDF()