Skip to content

Commit 4bb38a5

Browse files
committed
Updating all the SQL API quickstarts to use db level provisioned throughput
1 parent a16f246 commit 4bb38a5

11 files changed

+40
-49
lines changed

articles/cosmos-db/create-sql-api-dotnet-preview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ If you don’t already have Visual Studio 2019 installed, you can download and u
3838
[!INCLUDE [cosmos-db-emulator-docdb-api](../../includes/cosmos-db-emulator-docdb-api.md)]
3939

4040
<a id="create-account"></a>
41-
## Create a database account
41+
## Create an Azure Cosmos account
4242

4343
[!INCLUDE [cosmos-db-create-dbaccount-preview](../../includes/cosmos-db-create-dbaccount-preview.md)]
4444

4545
<a id="create-collection"></a>
46-
## Add a collection
46+
## Add a container
4747

4848
[!INCLUDE [cosmos-db-create-collection-preview](../../includes/cosmos-db-create-collection-preview.md)]
4949

articles/cosmos-db/create-sql-api-java.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ms.author: sngun
2121
> * [Python](create-sql-api-python.md)
2222
> * [Xamarin](create-sql-api-xamarin-dotnet.md)
2323
24-
This quickstart shows how to create and manage resources of an Azure Cosmos DB [SQL API](sql-api-introduction.md) account by using a Java application. First, you create an Azure Cosmos DB SQL API account using the Azure portal, create a Java app using the [SQL Java SDK](sql-api-sdk-async-java.md), add resources to your Cosmos DB account by using the Java application. The instructions in this quickstart can be followed on any operating system that is capable of running Java. After completing this quickstart you'll be familiar with creating and modifying Cosmos DB databases, collections in either the UI or programmatically, whichever is your preference.
24+
This quickstart shows how to create and manage resources of an Azure Cosmos DB [SQL API](sql-api-introduction.md) account by using a Java application. First, you create an Azure Cosmos DB SQL API account using the Azure portal, create a Java app using the [SQL Java SDK](sql-api-sdk-async-java.md), add resources to your Cosmos DB account by using the Java application. The instructions in this quickstart can be followed on any operating system that is capable of running Java. After completing this quickstart you'll be familiar with creating and modifying Cosmos DB databases, containers in either the UI or programmatically, whichever is your preference.
2525

2626
## Prerequisites
2727

@@ -43,7 +43,7 @@ Before you can create a document database, you need to create a SQL API account
4343

4444
[!INCLUDE [cosmos-db-create-dbaccount](../../includes/cosmos-db-create-dbaccount.md)]
4545

46-
## Add a collection
46+
## Add a container
4747

4848
[!INCLUDE [cosmos-db-create-collection](../../includes/cosmos-db-create-collection.md)]
4949

@@ -71,7 +71,7 @@ Now let's switch to working with code. Let's clone a SQL API app from GitHub, se
7171
This step is optional. If you're interested in learning how the database resources are created in the code, you can review the following snippets. Otherwise, you can skip ahead to [Run the app
7272
](#run-the-app).
7373
74-
* `AsyncDocumentClient` initialization. The [AsyncDocumentClient](https://docs.microsoft.com/java/api/com.microsoft.azure.cosmosdb.rx.asyncdocumentclient) provides client-side logical representation for the Azure Cosmos DB database service. This client is used to configure and execute requests against the service.
74+
* `AsyncDocumentClient` initialization. The [AsyncDocumentClient](https://docs.microsoft.com/java/api/com.microsoft.azure.cosmosdb.rx.asyncdocumentclient) provides client-side logical representation for the Azure Cosmos database service. This client is used to configure and execute requests against the service.
7575
7676
```java
7777
client = new AsyncDocumentClient.Builder()
@@ -200,7 +200,7 @@ Now go back to the Azure portal to get your connection string information and la
200200

201201
## Next steps
202202

203-
In this quickstart, you've learned how to create an Azure Cosmos DB account, document database, and collection using the Data Explorer, and run an app to do the same thing programmatically. You can now import additional data into your Azure Cosmos DB collection.
203+
In this quickstart, you've learned how to create an Azure Cosmos account, document database, and container using the Data Explorer, and run an app to do the same thing programmatically. You can now import additional data into your Azure Cosmos container.
204204
205205
> [!div class="nextstepaction"]
206206
> [Import data into Azure Cosmos DB](import-data.md)

articles/cosmos-db/create-sql-api-nodejs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This quickstart demonstrates how to create an Azure Cosmos DB [SQL API](sql-api-
3838

3939
[!INCLUDE [cosmos-db-create-dbaccount](../../includes/cosmos-db-create-dbaccount.md)]
4040

41-
## Add a collection
41+
## Add a container
4242

4343
[!INCLUDE [cosmos-db-create-collection](../../includes/cosmos-db-create-collection.md)]
4444

@@ -128,7 +128,7 @@ The following snippets are all taken from the **app.js** file.
128128
129129
Now go back to the Azure portal to get your connection string information and copy it into the app.
130130
131-
1. In the [Azure portal](https://portal.azure.com/), in your Azure Cosmos DB account, in the left navigation click **Keys**, and then click **Read-write Keys**. You'll use the copy buttons on the right side of the screen to copy the URI and Primary Key into the `config.js` file in the next step.
131+
1. In the [Azure portal](https://portal.azure.com/), in your Azure Cosmos account, in the left navigation click **Keys**, and then click **Read-write Keys**. You'll use the copy buttons on the right side of the screen to copy the URI and Primary Key into the `config.js` file in the next step.
132132

133133
![View and copy an access key in the Azure portal, Keys blade](./media/create-sql-api-dotnet/keys.png)
134134

@@ -159,7 +159,7 @@ You can now go back to Data Explorer and see query, modify, and work with this n
159159
160160
## Next steps
161161
162-
In this quickstart, you've learned how to create an Azure Cosmos DB account, create a collection using the Data Explorer, and run an app. You can now import additional data to your Cosmos DB account.
162+
In this quickstart, you've learned how to create an Azure Cosmos account, create a container using the Data Explorer, and run an app. You can now import additional data to your Cosmos DB account.
163163

164164
> [!div class="nextstepaction"]
165165
> [Import data into Azure Cosmos DB](import-data.md)

articles/cosmos-db/create-sql-api-python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This quickstart demonstrates how to create an Azure Cosmos DB [SQL API](sql-api-
3737

3838
[!INCLUDE [cosmos-db-create-dbaccount](../../includes/cosmos-db-create-dbaccount.md)]
3939

40-
## Add a collection
40+
## Add a container
4141

4242
[!INCLUDE [cosmos-db-create-collection](../../includes/cosmos-db-create-collection.md)]
4343

@@ -80,7 +80,7 @@ Now let's clone a SQL API app from GitHub, set the connection string, and run it
8080

8181
Now go back to the Azure portal to get your connection string information and copy it into the app.
8282

83-
1. In the [Azure portal](https://portal.azure.com/), in your Azure Cosmos DB account, in the left navigation click **Keys**. You'll use the copy buttons on the right side of the screen to copy the **URI** and **Primary Key** into the `CosmosGetStarted.py` file in the next step.
83+
1. In the [Azure portal](https://portal.azure.com/), in your Azure Cosmos account, in the left navigation click **Keys**. You'll use the copy buttons on the right side of the screen to copy the **URI** and **Primary Key** into the `CosmosGetStarted.py` file in the next step.
8484
8585
![View and copy an access key in the Azure portal, Keys blade](./media/create-sql-api-dotnet/keys.png)
8686
@@ -211,7 +211,7 @@ The following snippets are all taken from the `CosmosGetStarted.py` file.
211211
212212
## Next steps
213213
214-
In this quickstart, you've learned how to create an Azure Cosmos DB account, create a collection using the Data Explorer, and run an app. You can now import additional data to your Cosmos DB account.
214+
In this quickstart, you've learned how to create an Azure Cosmos account, create a container using the Data Explorer, and run an app. You can now import additional data to your Cosmos DB account.
215215
216216
> [!div class="nextstepaction"]
217217
> [Import data into Azure Cosmos DB for the SQL API](import-data.md)

articles/cosmos-db/create-sql-api-xamarin-dotnet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ If you are using a Mac, you can download the **free** [Visual Studio for Mac](ht
4343

4444
[!INCLUDE [cosmos-db-create-dbaccount](../../includes/cosmos-db-create-dbaccount.md)]
4545

46-
## Add a collection
46+
## Add a container
4747

4848
[!INCLUDE [cosmos-db-create-collection](../../includes/cosmos-db-create-collection.md)]
4949

@@ -240,7 +240,7 @@ The following steps will demonstrate how to run the app using the Visual Studio
240240
241241
## Next steps
242242
243-
In this quickstart, you've learned how to create an Azure Cosmos DB account, create a collection using the Data Explorer, and build and deploy a Xamarin app. You can now import additional data to your Azure Cosmos DB account.
243+
In this quickstart, you've learned how to create an Azure Cosmos account, create a container using the Data Explorer, and build and deploy a Xamarin app. You can now import additional data to your Azure Cosmos account.
244244
245245
> [!div class="nextstepaction"]
246246
> [Import data into Azure Cosmos DB](import-data.md)

includes/cosmos-db-create-collection-preview.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,24 @@
1010
ms.custom: include file
1111
---
1212

13-
You can now use the Data Explorer tool in the Azure portal to create a database and collection.
13+
You can now use the Data Explorer tool in the Azure portal to create a database and container.
1414

15-
1. Click **Data Explorer** > **New Collection**.
15+
1. Click **Data Explorer** > **New Container**.
1616

17-
The **Add Collection** area is displayed on the far right, you may need to scroll right to see it.
17+
The **Add Container** area is displayed on the far right, you may need to scroll right to see it.
1818

19-
![The Azure portal Data Explorer, Add Collection blade](./media/cosmos-db-create-collection/azure-cosmos-db-new-collection-preview.png)
19+
![The Azure portal Data Explorer, Add Container blade](./media/cosmos-db-create-collection/azure-cosmos-db-new-collection-preview.png)
2020

21-
2. In the **Add collection** page, enter the settings for the new collection.
21+
2. In the **Add container** page, enter the settings for the new container.
2222

23-
Setting|Suggested value|Description
24-
---|---|---
25-
Database id|*Tasks*|Enter *Tasks* as the name for the new database. Database names must contain from 1 through 255 characters, and they cannot contain /, \\, #, ?, or a trailing space.
26-
Collection id|*Items*|Enter *Items* as the name for your new collection. Collection ids have the same character requirements as database names.
27-
Provision database throughput|Leave blank|Azure Cosmos DB can provision throughput at either the database level (all collections in a database share the same throughput) or at the collection level. Leave blank to provision throughput at the collection level for this particular collection.
28-
Storage capacity|*Unlimited*|Choose the Storage capacity of **Unlimited**.
29-
Partition key|*/category*|Enter "/category" as the partition key. Setting a partition key allows Azure Cosmos DB to scale your collection to meet the storage and throughput needs of your application. In general, a good choice of partition key is one that has a wide range of distinct values, and results in an even distribution of storage and request volume across your workload. [Learn more about partitioning.](../articles/cosmos-db/partitioning-overview.md)
30-
Throughput|*400 RU/s*|Change the throughput to 400 request units per second (RU/s). If you want to reduce latency, you can scale up the throughput later.
23+
|Setting|Suggested value|Description
24+
|---|---|---|
25+
|**Database ID**|Tasks|Enter *Tasks* as the name for the new database. Database names must contain from 1 through 255 characters, and they cannot contain /, \\, #, ?, or a trailing space. Check the **Provision database throughput** option, it allows you to share the throughput provisioned to the database across all the containers within the database. This option also helps with cost savings. |
26+
|**Throughput**|400|Leave the throughput at 400 request units per second (RU/s). If you want to reduce latency, you can scale up the throughput later.|
27+
|**Container ID**|Items|Enter *Items* as the name for your new container. Container IDs have the same character requirements as database names.|
28+
|**Partition key**| /category| The sample described in this article uses */category* as the partition key. Setting a partition key allows Azure Cosmos DB to scale your collection to meet the storage and throughput needs of your application. In general, a good choice of partition key is one that has a wide range of distinct values, and results in an even distribution of storage and request volume across your workload. [Learn more about partitioning.](../articles/cosmos-db/partitioning-overview.md)|
3129

32-
In addition to the preceding settings, you can optionally add **Unique keys** for the collection. Let's leave the field empty in this example. Unique keys provide developers with the ability to add a layer of data integrity to the database. By creating a unique key policy while creating a collection, you ensure the uniqueness of one or more values per partition key. To learn more, refer to the [Unique keys in Azure Cosmos DB](../articles/cosmos-db/unique-keys.md) article.
30+
In addition to the preceding settings, you can optionally add **Unique keys** for the container. Let's leave the field empty in this example. Unique keys provide developers with the ability to add a layer of data integrity to the database. By creating a unique key policy while creating a container, you ensure the uniqueness of one or more values per partition key. To learn more, refer to the [Unique keys in Azure Cosmos DB](../articles/cosmos-db/unique-keys.md) article.
3331

34-
Click **OK**.
32+
Select **OK**. Data Explorer displays the new database and container.
3533

36-
Data Explorer displays the new database and collection.
37-
38-
![The Azure portal Data Explorer, showing the new database and collection](./media/cosmos-db-create-collection/azure-cosmos-db-data-explorer-preview.png)

includes/cosmos-db-create-collection.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,23 @@
1010
ms.custom: include file
1111
---
1212

13-
You can now use the Data Explorer tool in the Azure portal to create a database and collection.
13+
You can now use the Data Explorer tool in the Azure portal to create a database and container.
1414

15-
1. Click **Data Explorer** > **New Collection**.
15+
1. Select **Data Explorer** > **New Container**.
1616

17-
The **Add Collection** area is displayed on the far right, you may need to scroll right to see it.
17+
The **Add Container** area is displayed on the far right, you may need to scroll right to see it.
1818

19-
![The Azure portal Data Explorer, Add Collection pane](./media/cosmos-db-create-collection/azure-cosmosdb-data-explorer.png)
19+
![The Azure portal Data Explorer, Add Container pane](./media/cosmos-db-create-collection/azure-cosmosdb-data-explorer.png)
2020

21-
2. In the **Add collection** page, enter the settings for the new collection.
21+
2. In the **Add container** page, enter the settings for the new container.
2222

23-
Setting|Suggested value|Description
24-
---|---|---
25-
Database id|Tasks|Enter *Tasks* as the name for the new database. Database names must contain from 1 through 255 characters, and they cannot contain `/, \\, #, ?`, or a trailing space.
26-
Collection id|Items|Enter *Items* as the name for your new collection. Collection ids have the same character requirements as database names.
27-
Partition key| `<Your partition key>`| Enter a partition key such as */userid*.
28-
Throughput|400 RU|Change the throughput to 400 request units per second (RU/s). If you want to reduce latency, you can scale up the throughput later.
23+
|Setting|Suggested value|Description
24+
|---|---|---|
25+
|**Database ID**|Tasks|Enter *ToDoList* as the name for the new database. Database names must contain from 1 through 255 characters, and they cannot contain `/, \\, #, ?`, or a trailing space. Check the **Provision database throughput** option, it allows you to share the throughput provisioned to the database across all the containers within the database. This option also helps with cost savings. |
26+
|**Throughput**|400|Leave the throughput at 400 request units per second (RU/s). If you want to reduce latency, you can scale up the throughput later.|
27+
|**Container ID**|Items|Enter *Items* as the name for your new container. Container IDs have the same character requirements as database names.|
28+
|**Partition key**| /category| The sample described in this article uses */category* as the partition key.|
2929

30-
In addition to the preceding settings, you can optionally add **Unique keys** for the collection. Let's leave the field empty in this example. Unique keys provide developers with the ability to add a layer of data integrity to the database. By creating a unique key policy while creating a collection, you ensure the uniqueness of one or more values per partition key. To learn more, refer to the [Unique keys in Azure Cosmos DB](../articles/cosmos-db/unique-keys.md) article.
30+
In addition to the preceding settings, you can optionally add **Unique keys** for the container. Let's leave the field empty in this example. Unique keys provide developers with the ability to add a layer of data integrity to the database. By creating a unique key policy while creating a container, you ensure the uniqueness of one or more values per partition key. To learn more, refer to the [Unique keys in Azure Cosmos DB](../articles/cosmos-db/unique-keys.md) article.
3131

32-
Click **OK**.
33-
34-
Data Explorer displays the new database and collection.
35-
36-
![The Azure portal Data Explorer, showing the new database and collection](./media/cosmos-db-create-collection/azure-cosmos-db-new-collection.png)
32+
Select **OK**. The Data Explorer displays the new database and container.
37.1 KB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)