--- title: "Query Table" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/nosql/query-table/ description: "Catalyst NoSQL is a fully-managed, powerful database that provides you with a non-relational, non-SQL means of data storage. This page describes the SDK method to query a NoSQL table." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "NoSQL" url: /en/cloud-scale/help/nosql/introduction - name: "Table Keys" url: /en/cloud-scale/help/nosql/components/#table-keys - name: "JavaScript SDK" url: /en/sdk/javascript/v1/cloudscale/nosql/query-table/ --- # Query NoSQL Table > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/nosql/query-table/) now. Catalyst enables you to query a [NoSQL](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/introduction/) table and retrieve data by identifying the items using the [primary keys](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/components/#table-keys) of the table. For instance, you can use just the partition key or a combination of the partition key and sort key to retrieve the item. > **Note:** Catalyst enables you to retrieve a maximum of 100 items in bulk from a NoSQL table with pagination from a single SDK operation. You must use the `start_key` token received in the SDK response and construct the logic for pagination. You can define the key condition that identifies the item by specifying the attributes, their required values, and the supported operator to be used. The supported operators are represented as shown below.
Operators Notation
CONTAINS `contains`
NOT_CONTAINS `not_contains`
BEGINS_WITH `begins_with`
ENDS_WITH `ends_with`
IN `in`
NOT_IN `not_in`
BETWEEN `between`
NOT_BETWEEN `not_between`
EQUALS `equals`
NOT_EQUALS `not_equals`
GREATER_THAN `greater_than`
LESS_THAN `less_than`
GREATER_THAN_OR_EQUALS `greater_equal`
LESSER_THAN_OR_EQUALS `less_equal`
AND `AND`
OR `OR`
In the example below, the query is executed using the `queryTable()` method by identifying the items using the partition key `fruitType` and specifying the condition value as "Citrus". Catalyst NoSQL also lets you define other elements of the query, such as using `consistent_read` to indicate if the read operation must be done using the master or a slave cluster, limiting the number of rows to be returned, and specifying the sorting order as ascending. > **Note:** In the master-slave replication, the master contains all the data of the database, and the slave contains copies from the master. Performing a read operation from the slave can reduce the overall cost with the trade-off being a minor delay in the updated data being reflected. The `no-sql` library from the `zcatalyst-sdk-node` package is required to define the NoSQL item. ```javascript const { NoSQLMarshall, NoSQLEnum } = require('zcatalyst-sdk-node/lib/no-sql'); const { NoSQLOperator } = NoSQLEnum; // Query a NoSQL table to fetch the items identified by the partition key fruitType with the value "citrus" const queriedItem = await table.queryTable({ // Define the key condition to query the items with key_condition: { // Specify the partition key attribute name of the table attribute: 'fruitType', // Define the supported operator to be used. You can also use BETWEEN, GREATERTHAN, LESSERTHAN, GREATERTHANOREQUALTO, LESSERTHANOREQUALTO operator: NoSQLOperator.EQUALS, // Specify the value for comparison value: NoSQLMarshall.makeString('Citrus') }, // Set consistent_read to true to query from master. If set to false, it is queried from slave. consistent_read: true, // Limit the number of rows to be returned by specifying a value limit: 10, // Set forward_scan to true to sort the results in ascending order. Otherwise, it is sorted in the descending order. forward_scan: true }); ```