--- title: "Insert Items in Table" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/nosql/insert-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 insert 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: "Working with Data" url: /en/cloud-scale/help/nosql/working-with-data/introduction/ - name: "NoSQL API" url: /en/api/code-reference/cloud-scale/nosql/insert-item/#InsertNewItem --- # Insert NoSQL Items in Table Catalyst enables you to insert items in a specific [NoSQL](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/introduction/) table after you construct them. The items can be inserted in different ways as described in this section. You can refer to the help sections on adding and working with data, the [Catalyst custom JSON format](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/working-with-data/introduction/#the-catalyst-custom-json-format), and the [supported data types](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/working-with-data/introduction/#supported-data-types) to learn these topics in detail. > **Note:** Catalyst enables you to insert a maximum of 25 items in bulk in a NoSQL table with a single SDK operation. ### Insert Items without Conditions You can insert new items into a NoSQL table without any conditions either by using the `ZCNoSQLTable` instance, or the `ZCNoSQLInsertHelper` instance which can be used to construct the various parts of the request. You can insert data with the `ZCNoSQLTable` instance as shown below. ```java //public ZCNoSQLResponseBean insert(ZCNoSQLItem item) throws Exception; table.insert(<ZCNoSQLItem>); ``` You can insert data with the `ZCNoSQLInsertHelper` instance as shown below. ```java //public ZCNoSQLInsertHelper getInsertHelper(ZCNoSQLItem item) throws Exception; //public ZCNoSQLResponseBean insert() throws Exception; table.getInsertHelper(<ZCNoSQLItem>).insert(); ``` This class can be used to insert data into a table with conditions. This can be obtained from `ZCNoSQLTable` instance. ### Insert Items with Conditions You can insert attributes in existing items in a NoSQL table using specific conditions that you define. In this type, the existing data of the table is retrieved and evaluated against the specified condition. The items are inserted only if the evaluation is true. If there is no existing data, the conditions are ignored and the items are inserted. The snippet below shows inserting items with conditions using `ZCNoSQLCondition`. ```java //public ZCNoSQLInsertHelper withCondition(ZCNoSQLCondition condition) throws Exception; table.getInsertHelper(<ZCNoSQLItem>).withCondition(<ZCNoSQLCondition>).insert(); ``` Condition can be passed with the help of `ZCNoSQLCondition` instance which can be obtained by using a constructor or calling the `getInstance()` method. Conditions can be initialized in 3 methods #### 1. Using functions ```java //public static ZCNoSQLCondition getInstance(NoSQLConditionFunction function) throws Exception; //public ZCNoSQLCondition(NoSQLConditionFunction function) throws Exception; ZCNoSQLCondition.getInstance(<NoSQLCondtitionFunction>); new ZCNoSQLCondition(<NoSQLCondtitionFunction>) ``` There are two built in-functions available. **i. ZCNoSQLAttributeTypeFunction** Check if the data type of the given attribute matched the given datatype. ```java //public ZCNoSQLAttributeTypeFunction(ZCNoSQLAttribute attribute, ZCNoSQLValue.DataType dataType) throws Exception; //public static ZCNoSQLAttributeTypeFunction getInstance(ZCNoSQLAttribute attribute, ZCNoSQLValue.DataType dataType) throws Exception; ZCNoSQLAttributeTypeFunction.getInstance(<ZCNoSQLAttribute>, <ZCNoSQLValue.DataType>); new ZCNoSQLAttributeTypeFunction(<ZCNoSQLAttribute>, <ZCNoSQLValue.DataType>); ``` **ii. ZCNoSQLAttributeExistFunction ** This is used to evaluate if an attribute already exists in the retrieved item. ```java //public ZCNoSQLAttributeExistFunction(ZCNoSQLAttribute attribute); //public static ZCNoSQLAttributeExistFunction getInstance(ZCNoSQLAttribute attribute); ZCNoSQLAttributeExistFunction.getInstance(<ZCNoSQLAttribute>); new ZCNoSQLAttributeExistFunction(<ZCNoSQLAttribute>) ``` #### 2. Using operator, operand and value ```java //public static ZCNoSQLCondition getInstance(ZCNoSQLAttribute attribute, NOSQL_OPERATOR operator, ZCNoSQLValue value) throws Exception; //public ZCNoSQLCondition(ZCNoSQLAttribute attribute, NOSQL_OPERATOR operator, ZCNoSQLValue value) throws Exception; ZCNoSQLCondition.getInstance(<ZCNoSQLAttribute>, <NOSQL_OPERATOR>, <ZCNoSQLValue>); new ZCNoSQLCondition(<ZCNoSQLAttribute>, <NOSQL_OPERATOR>, <ZCNoSQLValue>); ``` #### NOSQL_OPERATOR The allowed `NOSQL_OPERATOR` values are contains, `not_contains`, `begins_with`, `ends_with`, `in`, `not_in`, `between`, `not_between`, `equals`, `not_equals`, `greater_than`, `less_than`, `greater_equal`, `less_equal` #### Using group of conditions ```java //public static ZCNoSQLCondition getInstance(List<ZCNoSQLCondition> groups, NOSQL_CONDITION_GROUP_OPERATOR groupOperator) throws Exception; //public ZCNoSQLCondition(List<ZCNoSQLCondition> groups, NOSQL_CONDITION_GROUP_OPERATOR groupOperator) throws Exception; ZCNoSQLCondition.getInstance(List<ZCNoSQLCondition>,<NOSQL_CONDITION_GROUP_OPERATOR>) new ZCNoSQLCondition(List<ZCNoSQLCondition>,<NOSQL_CONDITION_GROUP_OPERATOR>) ``` #### NOSQL_CONDITION_GROUP_OPERATOR The allowed `NOSQL_CONDITION_GROUP_OPERATOR` values are `AND`, `OR` #### NOSQL_RETURN_VALUE Indicates the return value after evaluating condition. ```java //public ZCNoSQLInsertHelper withReturnValue(NOSQL_RETURN_VALUE returnValue) throws Exception table.getInsertHelper(<ZCNoSQLItem>).withReturnValue(<NOSQL_RETURN_VALUE>).insert(); ``` The allowed `NOSQL_RETURN_VALUE` values are `NEW`, `OLD`, `NULL` #### Insert with Condition and Return Value ```java table.getInsertHelper(<ZCNoSQLItem>).withCondition(<ZCNoSQLCondition>).withReturnValue(<NOSQL_RETURN_VALUE>).insert(); ```