Insert data programmatically

You can use the Data API and CQL to insert data programmatically.

For required permissions to insert data, see Ways to insert data in Astra DB Serverless.

Insert data with the Data API

You can use the Data API to programmatically insert data into collections and tables in Serverless (Vector) databases.

For Data API commands and examples, see:

If you’re new to the Data API, try the quickstart for collections or the quickstart for tables for a demo of some common operations, including inserting data.

Insert data with CQL and drivers

For information about loading data and executing CQL statements with the CQL shell and drivers, see Cassandra Query Language (CQL) for Astra DB and Connect to a database: Drivers.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use | Manage Privacy Choices

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