Build a Cassandra App with Python SDK and Azure Cosmos DB
In this lab, you’ll practice setting up an Azure Cosmos DB that exposes a Cassandra API. You’ll also use Python scripts to connect to the database, load data, and perform simple queries.
Terms and conditions apply.
Lab info
Lab author
Challenge
Create a Cosmos DB Account with Cassandra API
You’ll use the Azure portal to create a Cosmos DB account that exposes the Cassandra API.
Challenge
Configure Cloud Shell to Connect to the Cassandra Database
You will open a a Bash terminal using Cloud Shell. Your goal is to configure the environment so that the Python scripts can connect to the Cassandra database that you just created.
Challenge
Create a Cassandra Keyspace and Tables
You’ll use the provided Python scripts to create a keyspace and three tables in the database. You’ll use another script to generate sample data, and will write it to the database. Then you’ll run queries in the portal to test everything out.
Challenge
Running Queries with Python Scripts
You’ll use the provided Python scripts to connect to the database, and will run queries using the different primary keys.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.
Recommended prerequisites
- Experience using the Azure portal
- Experience running commands in a Bash terminal
- Familiarity with Python scripts
- Familiarity with SQL queries and commands