Spark-MongoDB icon indicating copy to clipboard operation
Spark-MongoDB copied to clipboard

ObjectId is converted to a string.

Open kshahbazk opened this issue 8 years ago • 3 comments

I am writing an application with this connector. What the application is doing is reading a collection in from MongoDB doing some analysis on the information, and writing it back into another collection. But since the ObjectID is converted to a string, it doesn't update the correct object and just creates a new object. Is there a way to retain the ObjectID without converting it to a string?

kshahbazk avatar May 12 '16 02:05 kshahbazk

Hi @kshahbazk,

there is no way to do that at the moment but it seems an interesting feature for next releases. We also encourage you to participate in the implementation of this feature if you feel confident with the code.

Thanks for the suggestion.

mafernandez-stratio avatar May 12 '16 13:05 mafernandez-stratio

Hi @kshahbazk, I faced the same issue and have a quick solution for this. But need to change the source code the Spark-MongoDB.

joohnnie avatar Sep 11 '16 05:09 joohnnie

Hi, @joohnnie , could you explain your solution for the issue? Maybe I could help with the implementation.

cperezmig avatar Nov 04 '16 11:11 cperezmig