@ -69,7 +69,6 @@ A document is a collection of fields and object values, where the fields describ
The fields of interest in this document are: `firstname`, `id`, and `age`. The rest of the fields with the underscores were generated by Cosmos DB.
The fields of interest in this document are: `firstname`, `id`, and `age`. The rest of the fields with the underscores were generated by Cosmos DB.
#### Exploring Data with the Cosmos DB Emulator
#### Exploring Data with the Cosmos DB Emulator
You can download and install the emulator [for Windows here](https://aka.ms/cosmosdb-emulator). Refer to this [documentation](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=ssl-netstd21#run-on-linux-macos) for options on how to run the Emulator for macOS and Linux.
You can download and install the emulator [for Windows here](https://aka.ms/cosmosdb-emulator). Refer to this [documentation](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=ssl-netstd21#run-on-linux-macos) for options on how to run the Emulator for macOS and Linux.
@ -96,7 +95,9 @@ The query returns two documents, notice the age value for each document is less
#### JSON and Documents
#### JSON and Documents
If you're familiar with JavaScript Object Notation (JSON) you'll notice that documents look similar to JSON. In most instances, APIs that return JSON data can be directly transferred and stored in document databases. Below is another document, it represents tweet from the Microsoft Twitter account that was retrieved using the Twitter API, then inserted into Cosmos DB.
If you're familiar with JavaScript Object Notation (JSON) you'll notice that documents look similar to JSON. There is a `PersonsData.json` file in this directory with more data that you may upload to the Persons container in the Emulator via the `Upload Item` button.
In most instances, APIs that return JSON data can be directly transferred and stored in document databases. Below is another document, it represents tweets from the Microsoft Twitter account that was retrieved using the Twitter API, then inserted into Cosmos DB.
```json
```json
{
{
@ -112,9 +113,6 @@ If you're familiar with JavaScript Object Notation (JSON) you'll notice that doc
The fields of interest in this document are: `created_at`, `id`, and `text`.
The fields of interest in this document are: `created_at`, `id`, and `text`.
There is a `data.json` file with more Twitter data that you can upload to the SampleDB database. It's recommended that you add it to a separate container.
## Pre-Lecture Quiz
## Pre-Lecture Quiz
[Pre-lecture quiz]()
[Pre-lecture quiz]()
@ -123,6 +121,17 @@ There is a `data.json` file with more Twitter data that you can upload to the Sa
## 🚀 Challenge
## 🚀 Challenge
There is a `TwitterData.json` file that you can upload to the SampleDB database. It's recommended that you add it to a separate container. This can be done by:
1. Clicking the new container button in the top right
1. Selecting the existing database (SampleDB) creating a container id for the container
1. Setting the partition key to `/id`
1. Clicking OK (you can ignore rest of the information in this view as this is a small dataset running locally on your machine)
1. Open your new container and upload the Twitter Data file with `Upload Item` button
Try to run a few select queries to find the documents that have Microsoft in the text field. Hint: try to use the [LIKE keyword](https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-keywords#using-like-with-the--wildcard-character)
## Post-Lecture Quiz
## Post-Lecture Quiz
[Post-lecture quiz]()
[Post-lecture quiz]()
@ -133,6 +142,8 @@ There is a `data.json` file with more Twitter data that you can upload to the Sa
- This architectural documentation details the characteristics in the different types of non-relational data: [Non-relational Data and NoSQL](https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data)
- This architectural documentation details the characteristics in the different types of non-relational data: [Non-relational Data and NoSQL](https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data)
- Cosmos DB is a cloud based non-relational database that can also store the different NoSQL types mentioned in this lesson. Learn more about these types in this [Cosmos DB Microsoft Learn Module](https://docs.microsoft.com/en-us/learn/paths/work-with-nosql-data-in-azure-cosmos-db/)