top of page
lp.jpeg

Blog

Tags:

Amazon DynamoDB Connector Operations in Mule 4 (Part 1)



This blog post provides quick examples of how to use the Amazon DynamoDB Connector in Mule 4 using Anypoint Studio. There is a lot of documentation available on this connector’s usage, but none could be found that specifically shows how to structure the JSON requests, which are required for all DynamoDB connector operations.


This article explains all the connector operations along with their JSON requests, with simple use case scenarios.


We have considered all available DynamoDB data types for this use case, so you will have a very good understanding and usage of different DynamoDB data types.




Operations


Below is the list of connector operations considered for the first part of this series.

  1. Create Table

  2. Describe Table

  3. List Tables

  4. Put Item

  5. Batch Put Item - Single Table

  6. Batch Put Item - Multiple Tables

  7. Get Item

  8. Batch Get Item - Single Table

  9. Batch Get Item - Multiple Tables

  10. Update Item

  11. Query

  12. Scan

  13. Delete Item

  14. Batch Delete Item - Single Table

  15. Batch Delete Item - Multiple Tables



Use Case


To better understand the DynamoDB operations, we have considered a use case of the continents & their countries. All this data is segregated based on types of information & stored into two DynamoDB tables.


Each continent consists of multiple countries, & each country will have its own specific information like unique id, available city name, specialties, available zip codes, year-wise populations, etc. All this information is stored in the table “CONTINENT-COUNTRY-INFO-TABLE”.


Along with the above information, countries also have some classified information, like available agents in-country and intelligence agency information. All this classified information is stored in the table “COUNTRY-CLASIFIED-INFO-TABLE”.


This use case has taken into consideration (almost) all available DynamoDB connector operations and their data types for clear understanding.



CONTINENT-COUNTRY-INFO-TABLE

​Column Name

Data Type

Attributes

continent_name

String

​primary-partition-key

country_unique_id

Number

primary-sort-key

country_name

String

isActive

Boolean

country_specialities