Feature Request
Priority: P2 (Medium)
Description
CosmosDB Shell supports array input for mkitem (batch create) but lacks bulk upsert, update, and delete operations. Bulk operations are critical for data migration and maintenance tasks.
Comparable Features in Other Shells
- mongosh:
bulkWrite(), ordered/unordered bulk operations
- sqlcmd: Bulk insert via
bcp
Proposed Behavior
Add a bulk command or extend existing commands:
bulk upsert <file> — Bulk upsert from JSON array or file
bulk delete <query> — Bulk delete matching documents
bulk patch <file> — Bulk patch operations
- Support concurrency control (max parallelism)
- Report progress, success/failure counts, and total RU cost
Example Usage
bulk upsert ./updates.json --max-parallelism 10
bulk delete "SELECT c.id, c.pk FROM c WHERE c.expired = true"
bulk patch ./patches.json
Feature Request
Priority: P2 (Medium)
Description
CosmosDB Shell supports array input for
mkitem(batch create) but lacks bulk upsert, update, and delete operations. Bulk operations are critical for data migration and maintenance tasks.Comparable Features in Other Shells
bulkWrite(), ordered/unordered bulk operationsbcpProposed Behavior
Add a
bulkcommand or extend existing commands:bulk upsert <file>— Bulk upsert from JSON array or filebulk delete <query>— Bulk delete matching documentsbulk patch <file>— Bulk patch operationsExample Usage