One of the easiest ways to get started with Apache Cassandra™ is using Astra DB
In this scenario, we'll learn how to:
- Create an Astra DB database
- Create a container for cqlsh that connects to Astra DB
- Create a table in Astra DB
- Insert and query data
Astra DB is a great Cassandra as a Service offering and Docker containers are really slick, so this is going to be fun! Let's get started!
This scenario is also available on our datastax.com/dev site, where you can find many more resources to help you succeed with Apache Cassandra™.
Congratulations! you know how to get a quick start Docker for
cqlsh and connect to Apache Cassandra™ via Astra DB.
Check out the offical Cassandra Docker images on Docker Hub.
Was this helpful? Please give this scenario a rating (click on the stars above).
Have questions or more feedback? Send us a message.
Continue experimenting with your free 5 GB Cassandra database in the cloud at astra.datastax.com!
Connect to Astra DB (Cassandra as a Service) with CQL Shell using Docker
Create your Astra DB Database
If you don't have an Astra account, set one up - it's easy.
Go to the Astra DB page in your browser astra.datastax.com.
Let's create the database. Follow the steps outlined here. To make life easy, we have recommended the values you should use for this scenario.
NOTE: If you already have an Astra DB database with values that differ from what we suggested, you may have to adapt some of the operations in this scenario accordingly, or create an additional keyspace with the designated values.
If you don't already have an Astra DB database, when you log in the first time you'll see a screen that looks like the image below.
Configure your database by selecting the Free plan.
Next, select a provider and region. Then, click Configure.
Fill in the Configure and Create Database fields with the following values. Then, click the Create Database button.
- Database name: FirstDB
- Keyspace name: user_management
- Database username: DBUser
- Database password: DBPassword1
You will see the list of databases with your newly created database. While the database is initializing, the CONNECT button is inactive, but becomes active once the database is ready.
It may take a minute for the database to deploy, but you'll get an email when it's ready.