Skip to content

Commit 89b8284

Browse files
Merge pull request #237273 from seesharprun/cosmos-nosql-nodejs-quickstart-partition-key
Cosmos DB | Update NoSQL Node.js quickstart to use `categoryId` partition key
2 parents ef6e6e3 + 42b773e commit 89b8284

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/cosmos-db/nosql/quickstart-nodejs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: cosmos-db
77
ms.subservice: nosql
88
ms.devlang: javascript
99
ms.topic: quickstart
10-
ms.date: 02/21/2023
10+
ms.date: 05/08/2023
1111
ms.custom: devx-track-js, mode-api, ignite-2022, devguide-js, cosmos-db-dev-journey, passwordless-js, devx-track-azurecli
1212
---
1313

@@ -244,7 +244,7 @@ Add the following code to create a container with the [``Database.Containers.cre
244244

245245
### Create an item
246246

247-
Add the following code to provide your data set. Each _product_ has a unique ID, name, category name (used as partition key) and other fields.
247+
Add the following code to provide your data set. Each _product_ has a unique ID, name, category id (used as partition key) and other fields.
248248

249249
:::code language="javascript" source="~/cosmos-db-sql-api-javascript-samples/001-quickstart/index.js" range="37-84":::
250250

@@ -256,7 +256,7 @@ Create a few items in the container by calling [``Container.Items.create``](/jav
256256

257257
In Azure Cosmos DB, you can perform a point read operation by using both the unique identifier (``id``) and partition key fields. In the SDK, call [``Container.item().read``](/javascript/api/@azure/cosmos/item#@azure-cosmos-item-read) passing in both values to return an item.
258258

259-
The partition key is specific to a container. In this Contoso Products container, the category name, `categoryName`, is used as the partition key.
259+
The partition key is specific to a container. In this Contoso Products container, the category id, `categoryId`, is used as the partition key.
260260

261261
:::code language="javascript" source="~/cosmos-db-sql-api-javascript-samples/001-quickstart/index.js" range="93-95":::
262262

0 commit comments

Comments
 (0)