Insert data in the Astra Portal

After you create a collection or table, you can insert data.

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

If your CSV or JSON file is larger than 40 MB, see Migrate or insert large amounts of data.

Insert data into Serverless (vector) databases

You can use the Astra Portal to insert data from JSON, CSV, or PDF files into collections in Serverless (vector) databases.

To insert data into tables in the Astra Portal, use the CQL console (embedded CQL shell).

Load a JSON or CSV file into a collection

  1. In the Astra Portal, click the name of the database that you want to modify.

    Only Serverless (vector) databases support vector-enabled collections.

  2. Click Data Explorer.

  3. Select the keyspace and collection where you want to insert data.

  4. Click Load data.

  5. To load a JSON or CSV file, click Structured data.

  6. Click Select File, and then select the JSON or CSV file that contains your dataset.

    After the file uploads, the first ten rows or documents of your data appear in the Data Preview section.

    For JSON files, the Data Explorer attempts to detect discrete objects and separate them into individual documents (rows). If the Data Explorer doesn’t parse the documents as you expect, you can reformat your JSON file, convert it to a CSV file, break it into multiple smaller files, use the Data API to insert documents.

    If you get a Selected embedding does not match collection dimensions error, you need to create a new collection with a Dimension setting that matches your dataset.

  7. For a vector-enabled collection with an Astra vectorize integration, set Vector Field to the text field that you want to use to automatically generate embeddings.

    The data importer renames the selected field to $vectorize, and the original name is not retained. Embeddings are generated from the text contained in the selected field, and then the resulting embeddings are stored in a new $vector field.

    The Load Data dialog with Vector Field dropdown expanded.
  8. Optional: For CSV files, you can select the data type for each field or column in the Data Preview section The available types are String, Number, Array, Object, and Vector (vector-enabled collections only).

    For a vector-enabled collection, if the data importer detects embeddings in your dataset, it automatically assigns the Vector data type to that field or column. Each vector-enabled collection can have only one vector field.

    These data type selections only apply to the initial data that you load, with the exception of Vector, which permanently maps the field to the reserved key $vector. Data type selections aren’t fixed in the schema, and they don’t apply to documents inserted later. For example, the same field can be a string in one document and a number in another. You can also have different sets of fields in different documents in the same collection.

  9. Click Load Data.

    Imports can fail if JSON documents don’t comply with the Data API limits for documents.

Load PDF files into a vector-enabled collection

This Astra DB Serverless feature is currently in public preview. Development is ongoing, and the features and functionality are subject to change. Astra DB Serverless, and the use of such, is subject to the DataStax Preview Terms.

The Astra Unstructured.io integration transforms your unstructured PDF files into structured vector data. Astra DB processes your files with Unstructured Open Source and loads the resulting JSON or CSV data into your collection.

The Unstructured data loader integration has the following requirements and limitations:

  • You need a Serverless (vector) database.

  • You need a vector-enabled collection that uses an Astra vectorize integration. This integration is not available for collections where the Embedding generation method is Bring my own.

  • This integration is available in the Astra Portal only.

  • This integration supports PDF files only. It does not extract images in PDFs, but it can extract related text, such as captions.

To process PDFs with the Unstructured data loader integration, do the following:

  1. In the Astra Portal, click the name of the database that you want to modify.

    Only Serverless (vector) databases support vector-enabled collections.

  2. Click Data Explorer.

  3. Select the keyspace and collection where you want to insert data.

  4. Click Load data.

  5. Click Unstructured data.

  6. Click Select File, and then select up to 10 PDF files to process and load.

    You can load unstructured and structured vector data into the same collection, but you cannot load JSON and CSV files together with unstructured file types. You must upload JSON and CSV files separately through the Structured data option.

  7. Optional: Modify the chunking configuration:

    • Chunk max characters: Set the maximum chunk length. Unstructured splits oversized chunks to fit this limit. The default is 500. For more information, see chunk_max_characters.

      Your embedding model must support the chunk size you set. If the chunk size is larger than your model supports, an error occurs when you try to insert data.

    • Chunk character overlap: Set a chunk prefix of the last n characters from the prior chunk. This applies to oversized chunks only. The default is 0. For more information, see chunk_overlap.

  8. Click Load Data.

  9. Wait while Astra DB processes your files. If necessary, you can cancel processing for any files that have not started processing. Once a file begins processing, you cannot cancel it.

    During processing, Astra DB does the following:

Count records in collections

After you insert data, the Data Explorer in the Astra Portal shows a count of Records in the collection:

  • For collections with fewer than 1,000 documents, the Astra Portal shows an exact number.

  • For collections with 1,000 or more documents, the Astra Portal shows an approximate number of records.

The Astra Portal doesn’t count documents in real time. Particularly after loading many documents, allow time for the Records count to refresh.

To run these counts on demand, you can use the Data API countDocuments and estimatedDocumentCount commands.

Load data into a Serverless (non-vector) database

To load data into a Serverless (non-vector) database, you must use a programmatic approach:

Use the CQL console

In the Astra Portal, each Astra DB Serverless database has access to the CQL console, which is an embedded CQL shell instance. You can use the CQL console to run Cassandra Query Language (CQL) and cqlsh commands on your databases directly from your browser without installing any additional software. For more information, see Cassandra Query Language (CQL) for Astra DB.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | 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: Contact IBM