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
+92-92Lines changed: 92 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,105 +77,105 @@ In PowerShell, when the flag `-WhatIf` is passed in, Azure Cosmos DB will run a
77
77
78
78
#### [PowerShell](#tab/azure-powershell)
79
79
80
-
1. First, use [`Install-Module`](/powershell/module/powershellget/install-module) to install the [Az.CosmosDB](/powershell/module/az.cosmosdb/) module with pre-release features enabled.
81
-
82
-
```azurepowershell-interactive
83
-
$parameters = @{
84
-
Name = "Az.CosmosDB"
85
-
AllowPrerelease = $true
86
-
Force = $true
87
-
}
88
-
Install-Module @parameters
89
-
```
90
-
91
-
##### [API for NoSQL](#tab/azure-powershell/nosql)
92
-
93
-
1. Next, use `Invoke-AzCosmosDBSqlContainerMerge` with the `-WhatIf` parameter to preview the merge without actually performing the operation.
94
-
95
-
```azurepowershell-interactive
96
-
$parameters = @{
97
-
ResourceGroupName = "<resource-group-name>"
98
-
AccountName = "<cosmos-account-name>"
99
-
DatabaseName = "<cosmos-database-name>"
100
-
Name = "<cosmos-container-name>"
101
-
WhatIf = $true
102
-
}
103
-
Invoke-AzCosmosDBSqlContainerMerge @parameters
104
-
```
105
-
106
-
1. Finally, start the merge by running the same command without the `-WhatIf` parameter.
107
-
108
-
```azurepowershell-interactive
109
-
$parameters = @{
110
-
ResourceGroupName = "<resource-group-name>"
111
-
AccountName = "<cosmos-account-name>"
112
-
DatabaseName = "<cosmos-database-name>"
113
-
Name = "<cosmos-container-name>"
114
-
}
115
-
Invoke-AzCosmosDBSqlContainerMerge @parameters
116
-
```
117
-
118
-
##### [API for MongoDB](#tab/azure-powershell/mongodb)
119
-
120
-
1. Next, use `Invoke-AzCosmosDBMongoDBCollectionMerge` with the `-WhatIf` parameter to preview the merge without actually performing the operation.
Use [`Install-Module`](/powershell/module/powershellget/install-module) to install the [Az.CosmosDB](/powershell/module/az.cosmosdb/) module with pre-release features enabled.
144
81
145
-
---
82
+
```azurepowershell-interactive
83
+
$parameters = @{
84
+
Name = "Az.CosmosDB"
85
+
AllowPrerelease = $true
86
+
Force = $true
87
+
}
88
+
Install-Module @parameters
89
+
```
146
90
147
91
#### [Azure CLI](#tab/azure-cli)
148
92
149
-
1. First, 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.
150
-
151
-
```azurecli-interactive
152
-
az extension add \
153
-
--name cosmosdb-preview
154
-
```
155
-
156
-
##### [API for NoSQL](#tab/azure-cli/nosql)
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.
157
94
158
-
1. Now, start the merge by using [`az cosmosdb sql container merge`](/cli/azure/cosmosdb/sql/container#az-cosmosdb-sql-container-merge).
95
+
```azurecli-interactive
96
+
az extension add \
97
+
--name cosmosdb-preview
98
+
```
159
99
160
-
```azurecli-interactive
161
-
az cosmosdb sql container merge \
162
-
--resource-group '<resource-group-name>' \
163
-
--account-name '<cosmos-account-name>' \
164
-
--database-name '<cosmos-database-name>' \
165
-
--name '<cosmos-container-name>'
166
-
```
167
-
168
-
##### [API for MongoDB](#tab/azure-cli/mongodb)
169
-
170
-
1. Now, start the merge by using [`az cosmosdb mongodb collection merge`](/cli/azure/cosmosdb/mongodb/collection#az-cosmosdb-mongodb-collection-merge).
100
+
---
171
101
172
-
```azurecli-interactive
173
-
az cosmosdb mongodb collection merge \
174
-
--resource-group '<resource-group-name>' \
175
-
--account-name '<cosmos-account-name>' \
176
-
--database-name '<cosmos-database-name>' \
177
-
--name '<cosmos-collection-name>'
178
-
```
102
+
#### [API for NoSQL](#tab/nosql/azure-powershell)
103
+
104
+
Use `Invoke-AzCosmosDBSqlContainerMerge` with the `-WhatIf` parameter to preview the merge without actually performing the operation.
105
+
106
+
```azurepowershell-interactive
107
+
$parameters = @{
108
+
ResourceGroupName = "<resource-group-name>"
109
+
AccountName = "<cosmos-account-name>"
110
+
DatabaseName = "<cosmos-database-name>"
111
+
Name = "<cosmos-container-name>"
112
+
WhatIf = $true
113
+
}
114
+
Invoke-AzCosmosDBSqlContainerMerge @parameters
115
+
```
116
+
117
+
Start the merge by running the same command without the `-WhatIf` parameter.
118
+
119
+
```azurepowershell-interactive
120
+
$parameters = @{
121
+
ResourceGroupName = "<resource-group-name>"
122
+
AccountName = "<cosmos-account-name>"
123
+
DatabaseName = "<cosmos-database-name>"
124
+
Name = "<cosmos-container-name>"
125
+
}
126
+
Invoke-AzCosmosDBSqlContainerMerge @parameters
127
+
```
128
+
129
+
#### [API for NoSQL](#tab/nosql/azure-cli)
130
+
131
+
Start the merge by using [`az cosmosdb sql container merge`](/cli/azure/cosmosdb/sql/container#az-cosmosdb-sql-container-merge).
132
+
133
+
```azurecli-interactive
134
+
az cosmosdb sql container merge \
135
+
--resource-group '<resource-group-name>' \
136
+
--account-name '<cosmos-account-name>' \
137
+
--database-name '<cosmos-database-name>' \
138
+
--name '<cosmos-container-name>'
139
+
```
140
+
141
+
#### [API for MongoDB](#tab/mongodb/azure-powershell)
142
+
143
+
Use `Invoke-AzCosmosDBMongoDBCollectionMerge` with the `-WhatIf` parameter to preview the merge without actually performing the operation.
0 commit comments