yokawasa / azure-functions-python-samples

Azure Functions Python Sample Codes. NOTE: The project, hosted in a repository, is no longer actively maintained by its creators or contributors. There won't be any further updates, bug fixes, or support from the original developers in the project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to UPSERT an item

t-souravgoel opened this issue · 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() ?