Update Item in DYNAMO DB
Update item in Dynamo DB using Update item operation in Amazon Dynamo DB connector
Update Item :Edits an existing item’s attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn’t exist, or replace an existing name-value pair if it has certain expected attribute values).
You can also return the item’s attribute values in the same Update Item operation using the ReturnValues parameter.
Prerequisite: you should have access to update item in Dynamo DB
Create a project in anypoint studio and configure the listener
Drag and drop the Update Item Operation from mule palette and configure the Amazon Dynamo DB Connector
Create the payload to pass the primary key on which you want to update
%dw 2.0 output application/json --- { "EMPLOYEEID":{"S":"111"} }
Configure the table name, Key, Update expression and Attributes Values as shown below
Deploy and test the project, Item Updated successfully In Dynamo DB
Helloo, Can you share the query component of dynamo db?
I keep getting the error message like below. My understanding is “KeyConditionExpression” is mandatory to be sent in the request to AWS. I have a primary key with string data type.
“Invalid KeyConditionExpression: Syntax error; token: \”‘\”, near: \”(‘ID\””