As a newcomer to Azure, I have a requirement to modify the structure of an existing cosmos db collection by adding an additional property. I am looking to achieve this using a Stored Procedure. The collection currently has around 60 documents, and the same collection exists in other environments as well. Adding a single property to the collection structure needs to be a one-time activity.
While researching, I came across a post on Adding a new property to Cosmos DB, but my scenario is different. I need to update the collection structure using a Stored Procedure rather than C# code. However, since Cosmos DB only allows SELECT queries, I am unsure how to implement an ALTER document functionality in the provided code snippet below:
function updateDocument(documentName){
var collection = getContext().getCollection();
var response = getContext().getResponse();
collection.queryDocuments(
// Need to implement ALTER document functionality here
);
}