Feature Request
Priority: P1 (High)
Description
Cosmos DB supports transactional batch operations (multiple operations within the same partition key that either all succeed or all fail), but CosmosDB Shell does not expose this capability.
Comparable Features in Other Shells
- mongosh:
Session.startTransaction() / commitTransaction()
Proposed Behavior
Add transactional batch support:
batch begin — Start a batch context for a specific partition key
batch add <operation> — Add create/replace/upsert/patch/delete operations
batch execute — Execute all operations atomically
batch cancel — Discard pending operations
- Show per-operation results and total RU cost
Example Usage
cd /MyDatabase/MyContainer
batch begin --partition-key "pk1"
batch add create '{"id": "1", "pk": "pk1", "name": "Item 1"}'
batch add create '{"id": "2", "pk": "pk1", "name": "Item 2"}'
batch add delete "3"
batch execute
Feature Request
Priority: P1 (High)
Description
Cosmos DB supports transactional batch operations (multiple operations within the same partition key that either all succeed or all fail), but CosmosDB Shell does not expose this capability.
Comparable Features in Other Shells
Session.startTransaction()/commitTransaction()Proposed Behavior
Add transactional batch support:
batch begin— Start a batch context for a specific partition keybatch add <operation>— Add create/replace/upsert/patch/delete operationsbatch execute— Execute all operations atomicallybatch cancel— Discard pending operationsExample Usage