Fetch Items from NoSQL Table

Catalyst enables you to fetch items from a NoSQL table by identifying them with their primary keys. For instance, you can use just the partition key or a combination of the partition key and sort key to fetch the item. You can also optionally filter the attributes to be fetched by specifying the required attributes.

Note: Catalyst enables you to fetch a maximum of 100 items from a NoSQL table in a single SDK read operation.

Data can be fetched without filtering specific attributes by using the ZCNoSQLTable instance or it can be fetched with the help of ZCNoSQLFetchHelper instance which can be used to construct the various parts of the request.

To fetch data with ZCNoSQLTable Instance, the below can be used.

    
copy
//public ZCNoSQLResponseBean fetch(ZCNoSQLItem key) throws Exception; table.fetch(<ZCNoSQLItem>);

To fetch with ZCNoSQLFetchHelper

ZCNoSQLFetchHelper

This class can be used to fetch data from the table and filter our specific attributes. This can be obtained from ZCNoSQLTable instance.

    
copy
//public ZCNoSQLFetchHelper getFetchHelper(ZCNoSQLItem key) throws Exception; //public ZCNoSQLResponseBean fetch() throws Exception; table.getFetchHelper(<ZCNoSQLItem>).fetch();

Other methods available in ZCNoSQLFetchHelper

Required Attributes

This method can be used to filter and retrieve only the specific required attributes

    
copy
/public ZCNoSQLFetchHelper withRequiredAttributes(List<ZCNoSQLAttribute> requiredAttributesList) throws Exception; table.getFetchHelper(<ZCNoSQLItem>).withRequiredAttributes(<List of ZCNoSQLAttributes>).fetch();

You can also use consistency to indicate if the read operation must be done using the master or a slave cluster. When set to true, it is queried from the master. If false, it is queried from the slave.

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.

    
copy
//public ZCNoSQLFetchHelper withConsistency(boolean consistency) throws Exception; table.getFetchHelper(<ZCNoSQLItem>).withConsistency(true/false).fetch();

Fetch with Required Attributes and Consistency

    
copy
table.getFetchHelper(<ZCNoSQLItem>).withRequiredAttributes(<List of ZCNoSQLAttributes>).withConsistency(true/false).fetch();

Last Updated 2025-06-20 16:21:48 +0530 +0530

ON THIS PAGE

RELATED LINKS

NoSQL NoSQL API