Existing Cosmos DB documents need to be altered/updated with a new property & also existing documents of other collections need to be updated with the same new property along with its value.
Is there any recommended way or tool available to update existing documents on Cosmos DB, or is writing the custom c# application/PowerShell script using Cosmos DB SDK is the only option?
Example:
Existing user document
{
id:user1@mail.com,
name: "abc",
country: "xyz"
}
Updated user document
{
id:user1@mail.com,
name: "abc",
country: "xyz",
guid:"4334fdfsfewr" //new field
}
Existing order document of the user
{
id:user1@mail.com,
user: "user1@mail.com",
date: "09/28/2020",
amt: "$45"
}
Updated order document of the user
{
id:user1@mail.com,
user: "user1@mail.com",
userid: "4334fdfsfewr", // new field but with same value as in user model
date: "09/28/2020",
amt: "$45"
}