Retrieve Data From Dynamo DB Using Dynamo DB Connector In Mule
In This tutorial we will demonstrate how can we Retrieve Data From Dynamo DB Using Dynamo DB Connector In Mule 4.
Get Item : The GetItem operation returns a set of attributes for the item with the given primary key. If there is no matching item GetItem does not return any data and there will be no Item element in the response.
GetItem provides an eventually consistent read by default. If your application requires a strongly consistent read, set ConsistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value
please refer to below to get more detail:
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html
Prerequisite: Read access to get the items from amazon dynamo db
Create a project in anypoint studio and configure the listener
Drag and drop the get Item Operation from mule palette and configure the Amazon Dynamo DB Connector
Create the payload to pass the primary key to query the table
%dw 2.0 output application/json --- { "EMPLOYEEID":{"S":"111"} }
Configure the table name,Key, Attributes as shown below
Deploy and test the project from POSTMAN, data retrieved successfully from dynamo db table
Sample application :Download sample project
Can you please explain how to achieve the same result by Query connector of DynamoDB in Mule 4 ?