Difficulty: Intermediate
Estimated Time: 10-15 minutes

One of the easiest ways to get started with Apache Cassandra™ is using Astra

In this scenario, we'll learn how to:

  • Create an Astra database
  • Create a container for cqlsh that connects to Astra
  • Create a table in Astra
  • Insert and query data

Astra 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™.

ver 0.002

Congratulations! you know how to get a quick start Docker for cqlsh and connect to Apache Cassandra™ via Astra.

Check out the offical Cassandra Docker images on Docker Hub.

Interested in learning how to connect to Astra with a REST API? Try the Astra REST API Service scenario on datastax.com/dev.

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 (Cassandra as a Service) with CQL Shell using Docker

Step 1 of 5

Create your Astra Database

If you don't have an Astra account, set one up - it's easy.

Go to the Astra 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 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 database, when you log in the first time you'll see a screen that looks like the image below.

Astra Add Database

Configure your database by selecting the Free plan.

Select free plan

Next, select a provider and region. Then, click Configure.

Select provider and region

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

Configure and Create Database

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.

Connect Database dashboard

It may take a minute for the database to deploy, but you'll get an email when it's ready.

Congratulations! You have an active Cassandra database!