Passer au contenu

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 réponse
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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.