azure-functions-python-samples icon indicating copy to clipboard operation
azure-functions-python-samples copied to clipboard

How to UPSERT an item

Open t-souravgoel opened this issue 4 years ago • 0 comments

Hi, I am using python Azure functions with CosmosDB output binding, I want to update my container regularly and the items need to be the latest copies, not the previous ones. the doc.set method gives 409 error since the items have the uid field same but some other field changes every time the function runs, lets say the timestamp, how can upsert the item? I cannot remove the unique key feature. Is there any other method than .set() ?

t-souravgoel avatar Jun 12 '21 21:06 t-souravgoel