Construct NoSQL Item

Catalyst NoSQL items represent a collection of attributes that hold the data of a single data point, like records. You can insert or update items into an existing NoSQL table in your project in a Custom JSON format. However, before you insert or update an item in Catalyst, you will need to construct the item.

You can construct a NoSQL item of attributes containing different data types supported by Catalyst as described in the section below. Catalyst supports several data types such as String, Number, Set of Strings, Set of Numbers, List, and Map. Refer to the full list of supported data types to learn more.

You must mandatorily provide the values for the partition key attribute that you configured for a table in every data item. Refer to the Table Keys help section to learn about the table keys, TTL attribute, and other details.

The code snippet below shows the formats for constructing an item with attributes of different data types:

    
copy
# Construct a NoSQL item of different data types attributes = { # string "custom_attrib_string": { "S": "John Doe" }, # Number "custom_attrib_num": { "N": "234521" }, # Binary encoded value "custom_attrib_bin": { "B": "SGVsbG9Xb3JsZA==" }, # Set of string "custom_attrib_set_string": { "SS": ["John Doe", "New York", "USA"] }, # set of numbers "custom_attrib_set_num": { "SN": ["23423", "821n", "11"] }, # set of binary values "custom_attrib_set_bin": { "SB": ["SGVsbG8=", "V29ybGQ="] }, # boolean attribute "custom_attrib_bool": { "BOOL": True }, # list attribute "custom_attrib_list": { "L": [{"name": "banana"}, {"quantity": 4}] }, # map attribute "custom_attrib_map": { "M": { "name": { "S": "John Doe" }, "age": { "N": "23" } } } }

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