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.

The example below illustrates fetching an item identified by its partition key fruit and the sort key location using fetch_item(). Specific attributes such as properties and taste are filtered to be fetched using required_objects.

copy
# Fetch properties of a NoSQLItem identified with the partition key and sort key
res = table.fetch_item({
   "keys": [
    {
     "fruit": {
      "S": "apple"
     },
     "location: {
      "S": "USA"
     }
    }
  ],
# Specify the attributes to be fetched
   'required_objects': ["properties", "taste"] 
 })
print(res)

Last Updated 2025-09-24 18:46:10 +0530 IST

ON THIS PAGE