I was trying to write to MongoDB a Spark dataframe that contains the string representation of an ObjectId that is the _id of another collection.
The point is that PySpark has no support for ObjectId (Scala and Java ObjectId support explained here: https://github.com/mongodb/mongo-spark/blob/master/doc/1-sparkSQL.md) so, how could I insert an ObjectId into MongoDB from PySpark using the Spark Connector?