Find data with filters

Filters are a foundational way to find data in any database. They are best for matching an exact value or range of values, such as finding a user by their user ID.

In Astra DB Serverless, you can use filters alone or with sorting.

Find data with the Data Explorer in the Astra Portal

In the Astra Portal, you can use the Data Explorer to apply simple metadata filters to collections in Serverless (vector) databases. For required permissions, see Ways to find data in Astra DB Serverless.

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

    The Data Explorer is available for Serverless (vector) databases only. For Serverless (non-vector) databases, you must use the CQL shell or drivers.

  2. Click Data Explorer.

  3. Select a Keyspace.

  4. Select a Collection or Table.

    The default search mode depends on the configuration of the collection or table:

    • With vector search: For vector-enabled collections and tables with vector columns, the default search is a vector search. To run a vector search, enter an embedding or text string in the Search field. To combine vector search with metadata filters, click Filters. Astra DB automatically adds an initial filter based on the identifier or primary key. For more information about vector search with or without metadata filters, see Find data with vector search

    • Without vector search: For a non-vector collections and tables without vector columns, Astra DB automatically adds an initial filter based on the identifier or primary key. You can use the default filter, modify it, or click Add Filter to add more filters.

  5. Edit the default filter or define a new filter using filter keys, conditions, and values:

    • Key: Select the field or column to filter on. When searching tables, the Data Explorer only allows you to query indexed columns to prevent queries with ALLOW FILTERING, which can be long-running and resource intensive.

    • Condition: Select a filter condition, such as is or is not. Available filters depend on the Key data type. For more information about filter operators, see Filter operators for collections and Filter operators for tables.

    • Value: Enter the filter value. Conditions like is, is not, and contains require an exact, case-sensitive match on the Value.

    The following example filter uses is. This filter returns documents where the character field is exactly Lassie. It doesn’t return documents with values like lassie or Lassie Come Home, which are not exact, case-sensitive matches.

    • Key: character

    • Condition: is

    • Value: Lassie

    Alternatively, the following example filter uses is not. This filter returns documents where the color field isn’t exactly red. However, it can return documents containing Red and reddish, which are not exact, case-sensitive matches.

    • Key: color

    • Condition: is not

    • Value: red

  6. To add more filters, click Add Filter.

    Additional filters are appended together with the and operator. For other operators, you must use the Data API.

    To remove a filter, click Delete.

  7. Click Apply.

    The Records section updates based on your filters. Click Table and JSON to view the results in table format or JSON format.

Find data with the CQL console in the Astra Portal

The CQL console is an embedded CQL shell (cqlsh) instance in the Astra Portal. You can use the CQL console to execute CQL statements that use WHERE and ORDER BY clauses.

For more information about CQL and cqlsh, see Cassandra Query Language (CQL) for Astra DB.

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

Find data with the Data API console in the Astra Portal

When viewing a database in the Astra Portal, you can use the built-in API Console to run Data API commands without installing a client or writing a script.

The Data API console is a useful tool for exploring basic Data API commands. You can edit commands with the built-in text editor, run them on your database directly in the Astra Portal, or copy pre-generated snippets for use with the Data API clients and HTTP requests.

The Data API console has the following limitations:

  • Strictly scoped to the current database and one collection or table per command. To loop commands over multiple objects, you must run Data API commands outside of the Astra Portal.

  • Supports Data Manipulation Language (DML) operations only. The Data API console doesn’t provide access to DevOps API endpoints, including those supported by the Data API clients.

  • Pre-generated commands and code snippets don’t cover all possible Data API commands or parameters. For complete details about a particular command or parameter, see the Data API reference documentation.

The Data API console requires a user role with permission to view, read, and write to a given database.

For more information about Data API commands to find data, see Find data with the Data API.

Find data with the Data API

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.

With the Data API, you use filter and sort clauses to find data in collections and tables.

Any Data API command that involves finding data accepts one or both of these clauses.

Data API references for collections

For examples of filter and sort clauses in specific Data API commands, see the reference for the command that you want to run:

For general information about filter operators and sort clauses, see the following:

Data API references for tables

For examples of filter and sort clauses in specific Data API commands, see the reference for the command that you want to run:

For general information about filter operators and sort clauses, see the following:

Find data with CQL and drivers

Broadly speaking, you use the CQL WHERE and ORDER BY clauses to filter and sort data, and there are many ways to create complex CQL statements to find data efficiently.

For information about writing and executing CQL statements, see the following:

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