Skip to content

How to update Document DB Object_Id?

0

Hi Team,

I have migrated AWS MySQL RDS to AWS Document DB, After migration Document DB Oject_id shows as 1,2,3.... etc. In the collection there is one date column, i need to update that date column with some random character to Object_Id, Is this possible? If yes How to do that?

1 Answer
0

You can achieve that with things like PyMongo. Obviouslly keep in mind that since you are updating the id of the document it is like creating a brand new document, given the Atomicity of Document DB.

Make sure there are no indexes on the id and that it is unique.

EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.