You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/merge.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,12 +93,24 @@ Install-Module @parameters
93
93
Use [`az extension add`](/cli/azure/extension#az-extension-add) to install the [cosmosdb-preview](https://github.com/azure/azure-cli-extensions/tree/main/src/cosmosdb-preview) Azure CLI extension.
94
94
95
95
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
96
105
```azurecli-interactive
97
106
az extension add \
98
107
--name cosmosdb-preview
99
108
```
100
109
101
110
111
+
112
+
113
+
102
114
---
103
115
104
116
#### [API for NoSQL](#tab/nosql/azure-powershell)
@@ -143,13 +155,21 @@ az cosmosdb sql container merge \
143
155
For **shared throughput databases**, start the merge by using `az cosmosdb sql database merge`.
144
156
145
157
158
+
159
+
160
+
146
161
```azurecli
147
162
az cosmosdb sql database merge \
148
163
--account-name '<cosmos-account-name>'
149
164
--name '<cosmos-database-name>'
150
165
--resource-group '<resource-group-name>'
151
166
```
152
167
168
+
169
+
```http
170
+
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/partitionMerge?api-version=2023-11-15-preview
171
+
```
172
+
153
173
#### [API for MongoDB](#tab/mongodb/azure-powershell)
154
174
155
175
Use `Invoke-AzCosmosDBMongoDBCollectionMerge` with the `-WhatIf` parameter to preview the merge without actually performing the operation.
Start the merge by using [`az cosmosdb mongodb collection merge`](/cli/azure/cosmosdb/mongodb/collection#az-cosmosdb-mongodb-collection-merge).
202
+
For **shared-throughput databases**, start the merge by using [`az cosmosdb mongodb database merge`](/cli/azure/cosmosdb/mongodb/database?view=azure-cli-latest).
203
+
204
+
205
+
206
+
```azurecli
207
+
az cosmosdb mongodb database merge \
208
+
--account-name '<cosmos-account-name>'
209
+
--name '<cosmos-database-name>'
210
+
--resource-group '<resource-group-name>'
211
+
```
212
+
213
+
214
+
```http
215
+
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/partitionMerge?api-version=2023-11-15-preview
216
+
```
217
+
218
+
For **provisioned containers**, start the merge by using [`az cosmosdb mongodb collection merge`](/cli/azure/cosmosdb/mongodb/collection#az-cosmosdb-mongodb-collection-merge).
0 commit comments