--- title: "Update Items" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/nosql/update-items/ 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 update items in a NoSQL table." last_updated: 2025-06-20T10:51:48Z service: Cloud Scale type: general related_links: - name: "NoSQL" url: /en/cloud-scale/help/nosql/introduction/ - name: "NoSQL API" url: /en/api/code-reference/cloud-scale/nosql/insert-item/#InsertNewItem --- # Update Items in a NoSQL Table Catalyst enables you to update items in a specific [NoSQL](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/introduction/) table after you construct them. An item can be updated by identifying it using its [primary keys](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/components/#table-keys). For instance, you can use just the partition key or a combination of the partition key and sort key to identify the item. You can then define the update operation type with the appropriate HTTP request method and provide the attributes and values to be updated in the item. > **Note:** Catalyst enables you to update a maximum of 25 items in bulk in a NoSQL table with a single SDK operation. There are two ways to update the data. Data can be updated without any conditions by using the `ZCNoSQLTable` instance or it can be updated with the help of `ZCNoSQLUpdateHelper` instance which can be used to construct the various parts of the request. You can update the data with the `ZCNoSQLTable` instance as shown below. ```java //public ZCNoSQLResponseBean update(ZCNoSQLItem item, ZCNoSQLUpdateAttributeOperation updateAttributeOperation) throws Exception; table.update(<ZCNoSQLItem>, <ZCNoSQLUpdateAttributeOperation>); ``` To update with ZCNoSQLUpdateHelper #### ZCNoSQLUpdateHelper ```java //public ZCNoSQLInsertHelper getInsertHelper(ZCNoSQLItem item) throws Exception; //public ZCNoSQLResponseBean insert() throws Exception; table.getUpdateHelper(<ZCNoSQLItem>, <ZCNoSQLUpdateAttributeOperation>).update(); ``` #### ZCNoSQLUpdateAttributeOperation This class is used update the item by either adding/updating existing attribute or deleting existing attribute. An instance of the above can be obtained using the below methods. For inserting or updating attributes ```java //ZCNoSQLUpdateAttributeOperation(ZCNoSQLAttribute attribute, ZCNoSQLValue updateValue); //ZCNoSQLUpdateAttributeOperation(ZCNoSQLAttribute attribute, NoSQLUpdateAttributeFunction updateFunction); //public static ZCNoSQLUpdateAttributeOperation getPutAttributeInstance(ZCNoSQLAttribute attribute, ZCNoSQLValue updateValue); // public static ZCNoSQLUpdateAttributeOperation getPutAttributeInstance(ZCNoSQLAttribute attribute, NoSQLUpdateAttributeFunction updateFunction); new ZCNoSQLUpdateAttributeOperation(<ZCNoSQLAttribute>, <ZCNoSQLValue>); new ZCNoSQLUpdateAttributeOperation(<ZCNoSQLAttribute>, <NoSQLUpdateAttributeFunction>); ZCNoSQLUpdateAttributeOperation.getPutAttributeInstance(<ZCNoSQLAttribute>, <ZCNoSQLValue>); ZCNoSQLUpdateAttributeOperation.getPutAttributeInstance(<ZCNoSQLAttribute>, <NoSQLUpdateAttributeFunction>) ``` For Deleting attributes ```java //ZCNoSQLUpdateAttributeOperation(ZCNoSQLAttribute attribute); //public static ZCNoSQLUpdateAttributeOperation getDeleteAttributeInstance(ZCNoSQLAttribute attribute); new ZCNoSQLUpdateAttributeOperation(<ZCNoSQLAttribute>); ZCNoSQLUpdateAttributeOperation.getDeleteAttributeInstance(<ZCNoSQLAttribute>); ``` Update also have certain prebuilt functions that can be used to update the values. These functions can be grouped under the type NoSQLUpdateAttributeFunction and can be used while obtaining the ZCNoSQLUpdateAttributeOperation instance. ### NoSQLUpdateAttributeFunction There are 4 prebuild functions. #### ZCNoSQLIfNotExistFunction This function is used update the attribute with the value of another existing attribute. If the attribute does not exist, then the given value is updated. ```java //public ZCNoSQLIfNotExistFunction(ZCNoSQLAttribute attribute, ZCNoSQLValue value) //public static ZCNoSQLIfNotExistFunction getInstance(ZCNoSQLAttribute attribute, ZCNoSQLValue value); new ZCNoSQLIfNotExistFunction(<ZCNoSQLAttribute>, <ZCNoSQLValue>) ZCNoSQLIfNotExistFunction.getInstance(<ZCNoSQLAttribute>, <ZCNoSQLValue>) ``` #### ZCNoSQLAppendListFunction This function is append elements to existing or new list attribute. ```java //public ZCNoSQLAppendListFunction(ZCNoSQLValue...values); //public static ZCNoSQLAppendListFunction getInstance(ZCNoSQLValue...values); new ZCNoSQLAppendListFunction(<List of ZCNoSQLValue>) ZCNoSQLAppendListFunction.getInstance(<List of ZCNoSQLValue>) ``` #### ZCNoSQLAdditionFunction This function is used to add elements to a set or add numeric value to existing attribute. The type of operation depends on the targetted attribute type. ```java //public ZCNoSQLAdditionFunction(ZCNoSQLAttribute attribute, ZCNoSQLValue value); //public static ZCNoSQLAdditionFunction getInstance(ZCNoSQLAttribute attribute, ZCNoSQLValue value); new ZCNoSQLAdditionFunction(<ZCNoSQLAttribute>, <ZCNoSQLValue>) ZCNoSQLAdditionFunction.getInstance(<ZCNoSQLAttribute>, <ZCNoSQLValue>) ``` #### ZCNoSQLReductionFunction This function is used to remove elements from a set or subtract numeric value to existing attribute. The type of operation depends on the targetted attribute type. ```java //public ZCNoSQLReductionFunction(ZCNoSQLAttribute attribute, ZCNoSQLValue value) throws Exception; //public static ZCNoSQLReductionFunction getInstance(ZCNoSQLAttribute attribute, ZCNoSQLValue value) throws Exception; new ZCNoSQLReductionFunction(<ZCNoSQLAttribute>, <ZCNoSQLValue>) ZCNoSQLReductionFunction.getInstance(<ZCNoSQLAttribute>, <ZCNoSQLValue>) ``` Other methods available in ZCNoSQLUpdateHelper #### ZCNoSQLCondition The Same conditions described above can be reused for update too. NOSQL_RETURN_VALUE The Same return value described above can be reused for update too. Update with Condition and Return Value ```java table.getUpdateHelper(<ZCNoSQLItem>,<ZCNoSQLUpdateAttributeOperation>).withCondition(<ZCNoSQLCondition>).withReturnValue(<NOSQL_RETURN_VALUE>).update(); ```