내용으로 건너뛰기

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개 답변
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.

전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.