hands-on lab

Developing with the Cosmos DB Core API and Change Feed

Intermediate
1h 30m
3,267
4/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Azure Cosmos DB is a fully-managed, globally-distributed, multi-model database. Databases in Cosmos DB are enterprise-ready and highly-available offering up to 99.999% availability SLA. In this Lab, you will learn how to manage Cosmos DB using the Azure Portal and Azure CLI as you integrate Azure Functions with Cosmos DB change feed triggers to buy and sell fictitious stocks. This lab uses the NoSQL API in Cosmos DB to work with a document database model.

Lab Objectives

Upon completion of this lab you will be able to:

  • Understand the multi-model capabilities of Cosmos DB
  • Perform geo-replication and failovers in Cosmos DB
  • Understand the tradeoffs involved in deciding on a concurrency model and throughput level in Cosmos DB
  • Connect to and work with NoSQL API Cosmos DB databases using the Azure Portal

Intended Audience

This lab is intended for:

  • Prospective developers, data scientists and database engineers
  • Anyone who needs the ability to store, edit and view data
  • Anyone interested in full-stack, backend or website development

Prerequisites

You should be familiar with:

  • The concept of SQL and document databases

Updates

September 6th, 2023 - Resolved an issue causing the Azure Function to not respond to the Cosmos DB trigger

August 15th, 2023 - Resolved intermittent deployment issue

October 14th, 2022 - Updated the instructions and screenshots to reflect the latest UI

June 28th, 2022 - Updated instructions and screenshots to match UI

December 10, 2021 - Updated instructions to reflect the address button hidden by pop-up

August 26th, 2021 - Updated instructions to reflect the latest CosmosDB experience

June 21st, 2021 - Updated the lab UI due to Azure UI changes

January 4th, 2021 - Updated the lab UI due to Azure UI changes

May 22nd, 2020 - Updated the lab's security policy and lab step instructions to account for an update to Azure's function app monitoring

March 24th, 2020 - Updated instructions to avoid using the free tier discount which causes deployment of the database to fail.

Environment before
Environment after
About the author
Avatar
Matt Martinez
Cloud Content & Labs QA
Students
108,031
Labs
41
Learning paths
9

Matt has worked for multiple Fortune 500 companies as a DevOps Engineer and Solutions Architect. He is an AWS Certified DevOps Engineer - Professional, and an AWS Certified Solution Architect - Associate. He enjoys reading and learning new technologies.

Covered topics
Lab steps
Logging in to the Microsoft Azure Portal
Creating an Azure Cosmos DB NoSQL Database in the Azure Portal
Creating a Cosmos DB NoSQL Container
Inserting and Viewing Data with the Cosmos DB NoSQL API
Editing and Deleting Data with the Cosmos DB NoSQL Data Explorer
Learning about Consistency in Cosmos DB
Triggering an Azure Function With Cosmos DB NoSQL Changes
Testing the Azure Function Cosmos DB NoSQL Trigger