Hi @Hala Ibrahim Thanks for posting your question in the Microsoft Q&A forum.
Unfortunately, you cannot perform a bulk update without the Partition Key unless the item was created without a Partition Key.
Regards
Geetha
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I want to batch items (update them all in one single operation) in cosmos DB.
The items are in the same container but have different partition keys..
Any idea ?
CreateTransactionalBatch has limitation of using same partitionKey..
any other alternative?
Thanks in advance
Hi @Hala Ibrahim Thanks for posting your question in the Microsoft Q&A forum.
Unfortunately, you cannot perform a bulk update without the Partition Key unless the item was created without a Partition Key.
Regards
Geetha
a cosmos db is made up of partitions. each partition may be on separate server. atomically updating two partitions would require cross server two phase commit, and would break the Comos DB response time commitments.
as a Transaction Batch is an atomic operator by definition, it can not cross partitions. if you don't need an atomic transaction, then
you don't specify your requirements. you could write a cosmos db stored procedure that you passed the batch items to, and it could insert non-atomically.
note: stored process are easier to write, if you create async wrappers for the api calls. see: