Load and retrieve data

This quick start will help you so you can load and retrieve your data in your DataStax Astra DB database with ease. For this example, we’ll use the Stargate Document API.

Here are the basic steps:

  1. Create your Astra DB account.

  2. Create your database.

  3. Get your application token.

  4. Load data to your database.

  5. Get data from your database.

If you want to create multiple databases, create a new organization first.

Create your Astra DB account

Register for a new Astra DB account. You can use your business email and a password, or create an account with GitHub or Google.

Wasn’t that easy? Now you can create your database.

Create your database

You’ve already created your Astra DB account. Let’s create a database where you’ll be able to load and get your data for your application.

Here are a few key things you should know as you create your database:

  • Your database stores all of your information. For this example, name your database example.

  • A keyspace stores your group of tables, like a schema in a relational database. This helps keep related tables of information in a single place within your database.
    For this example, name your keyspace fitness.

  • Select a region that is geographically close to your users to optimize performance.


  1. In Astra Portal, select Create Database.

  2. Select a plan if you do not have an existing plan.

    See plan options for the benefits of each plan. You can upgrade from a free or pay as you go plan to a committed plan as your needs might change.

    If you need more options, contact DataStax Support.
  3. If you are creating a database with a pay as you go or an annual commitment plan, enter your payment method to continue. If you are creating a free plan, you do not have to enter a credit card. You can get started for free with your $25 credit. You can enter a payment method later to move to a pay as you go plan or annual commitment plan if needed.

  4. Enter your basic details:

    • Database Name: Name your database something meaningful. The database name cannot be altered after the database is created. Use only alphanumeric characters; there is no character limit.

    • Keyspace Name: Name your keyspace to reflect your data model. You cannot name your keyspace “dse” or “system”. Use only alphanumeric characters and no more than 48 total characters.

  5. Select your cloud provider and then the region where you want to launch your database from the region menu, which reflects the available regions based on your selected cloud provider. Regions with the lock symbol require payment.

    locked regions1

You can preview the costs for the database based on read and write requests, storage, and data transfer.
  1. Select Create Database.

    database created

    1. Click X at the top right of the screen to return to your Astra DB dashboard.

    2. Click Generate Token to download tokens generated for you.

  2. An alert appears at the top of the screen when your database is created.

Congrats! You have a database! Before you can load data into your database, you need to get a new application token.

Get an application token

Before you can load data into your newly created database, you need to create your application token.

You can also create an application token using the DevOps API.

  1. From any page in Astra DB, select the Organizations dropdown.

    Organization Selection
  2. In the main dropdown, select Organization Settings.

  3. From your Organization page, select the Tokens tab.

  4. Select the role you want to attach to your token. The permissions for your selected role will be displayed.

  5. Select Generate Token. Astra DB will generate your token and display the Client ID, Client Secret, and Token.

  6. Download your Client ID, Client Secret, and Token.

After you navigate away from the page, you won’t be able to download your Client ID, Client Secret, and Token again. These tokens do not automatically expire, but can be destroyed in case they are compromised or no longer needed.

Copy your application token and let’s go load some data into your database.

Load data into your database

You’ve already created your database and created your application token. Let’s take a look at loading data into your Astra DB database.

You can load data into your Astra DB database with any of these methods:

What’s next?

Are you ready to explore more in Astra DB? Check out these topics:

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com