Delete Items from NoSQL Table

You can delete items from a NoSQL table in Catalyst by identifying them using the primary keys of the table. For instance, you use just the partition key, or a combination of the partition key and sort key of the table, to identify an item.

Note: Catalyst enables you to delete a maximum of 25 items in bulk from a NoSQL table with a single SDK operation.

The delete operation is performed using the deleteItems() method as shown in the example below. The item with the partition key fruit matching “apple” is deleted. The no-sql library from the zcatalyst-sdk-node package is required to define NoSQL items.

    
copy
const { NoSQLItem } = require('zcatalyst-sdk-node/lib/no-sql'); //Delete a NoSQL item from the table with partition key "fruit" and the value matching "apple" const deletedItems = await table.deleteItems({ //Specify the partition key value of the item to be deleted keys: NoSQLItem.from({ fruit: 'apple' }) });

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

ON THIS PAGE