Dark Mode

Introduction

Here is a quick overview of how to get started with DSBulk and Astra. This will provide you with the necessary steps to load your CSV data into the Astra console through the command line.

  • From your desktop in the terminal, download the dsbulk installation file:
  • Unzip the folder:
  • Make sure that everything is running correctly through the command line:

DSBulk version 1.8.0 is installed and ready to use.

Before you can run DSBulk, get the necessary credentials to connect to Astra. To run DSBulk, we need the Client ID, Client Secret and Secure Connect Bundle.

  • Navigate to you Organization Settings.
  • Select Token Management
  • From the dropdown menu, select Admin User.
  • Generate a token for your Admin User role by selecting Generate Token.
  • Select Download CSV to store these credentials locally.
  • Navigate to your Dashboard Overview.
  • Select the Connect tab.
  • Download the Secure Connect Bundle to store locally.

To load your data with DSBulk, you need to create a keyspace and table.

  • Select Add Keyspace.
  • Create a table through the CQL console in your database:
  • Run desc tables; to confirm the new table exists:

The table has been successfully created.

With your keyspace and table set up, you can upload your data.

If you want to use sample data, check out the link:https://www.kaggle.com/ajaypalsinghlo/world-happiness-report-2021?select=world-happiness-report-2021.csv[worldhappiness_report2021.csv].

To execute the DSBulk upload, you will need access to the file path.

  • Load your table using DSBulk:

Success! Your rows were loaded into the table. This is a small test sample size, but DSBulk is capable of loading/unloading extremely large files.

Now, all that is left is to view the data in the Astra console.

  • Navigate back to the CQL shell in Astra.
  • Run the following command to see the output: