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.
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 |