1715total visits.
In the previous blog, we learned about “What is Azure Cosmos DB” and “How to create an Azure Cosmos DB“.
Now in this part, we will learn how to add collection and sample data to Azure Cosmos DB.
Adding collection and sample data is not difficult, we can do it using Azure Portal or via Apps. Today we are going to add collection and sample data using Azure Portal.
Let’s navigate to Data Explorer in Azure Cosmos DB as shown in the figure.

It shows the database and collection.
Add Sample Data using Data Explorer
Now, let’s add sample data to the collection. We can add sample data to the collection using Data Explorer
In Data Explorer, the new database appears in the Collections pane. Add New Collection and provide the details as follows.
| S.No | Name | Description |
|---|---|---|
| 1 | Database id | Database name. A database is a logical container of one or more collection |
| 2 | Collection id | Unique identifier for the collection. used for id based routing. |
| 3 | Storage capacity | This is the maximum storage size of the collection. Storage is billed per GB based on consumption. You can choose between Fixed(10 GB) and Unlimited. |
| 4 | Throughput (400 – 10,000 RU/s) | Request units per second for Collection. |
Expand the CountryData database, expand the population_density collection, click Documents, and then click New Documents.
Now Click Upload. Now choose a JSON document and click upload.

Once upload completes, we can navigate the uploaded data.
