DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Containers Trend Report: Explore the current state of containers, containerization strategies, and modernizing architecture.

Low-Code Development: Learn the concepts of low code, features + use cases for professional devs, and the low-code implementation process.

E-Commerce Development Essentials: Considering starting or working on an e-commerce business? Learn how to create a backend that scales.

Related

  • Kafka JDBC Source Connector for Large Data
  • Handle HL7 MLLP Messages With Mule 4
  • Introduction to Couchbase for Oracle Developers and Experts: Part 4: Data Modeling
  • Introduction to Couchbase for Oracle Developers and Experts: Part 2 - Database Objects

Trending

  • The Top 5 Tools for Automated Front-End Testing
  • Master the Art of Data Security: A Complete Guide To Securing Data at Rest on Amazon S3
  • Software Architecture Design Patterns for Serverless System
  • The Future of Java: Virtual Threads in JDK 21 and Their Impact
  1. DZone
  2. Data Engineering
  3. Databases
  4. Amazon Dynamo DB Connector Operations Walkthrough in Mule 4, Part 1

Amazon Dynamo DB Connector Operations Walkthrough in Mule 4, Part 1

This article provides a step-by-step guide on how to use multiple operations of Dynamo DB connector, along with their JSON requests and configurations.

Prashant Gunjal user avatar by
Prashant Gunjal
·
Updated Feb. 24, 22 · Tutorial
Like (3)
Save
Tweet
Share
9.5K Views

Join the DZone community and get the full member experience.

Join For Free

Amazon Dynamo DB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. Dynamo DB lets you offload the administrative burdens of operating and scaling a distributed database so that you don't have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.

The following provides a quick example of how to use the “Amazon Dynamo DB Connector Operations – Mule 4” using Anypoint Studio. While there is a lot of documentation available on this connector usage, none could be found that specifically shows how to structure the JSON requests, required for multiple connector operations.

Below is the list of operations considered for Part 1 (remaining operations will be continued in Part 2).

  1. Create Table
  2. Describe Table
  3. List Tables
  4. Put Item
  5. Batch Put Items
    • Batch Put Item: Single Table
    • Batch Put Item: Multiple Table
  6. Get Item
  7. Batch Get Item
    • Batch Get Item: Single Table
    • Batch Get Item: Multiple Table
  8. Update Item
  9. Delete Item
  10. Batch Delete Item
    • Batch Delete Item: Single Table
    • Batch Delete Item: Multiple Table

Prerequisites

To use the Amazon Dynamo DB connector, we need to have the following:

  • An AWS account with accessibility to the Amazon Dynamo DB
  • AWS Identity and Access Management (IAM) credentials including access and secret keys

Use Case

We have considered two tables in Dynamo DB with employee-specific information in each of them. Below are the tables configurations. 

Table 1: AWS-EMPLOYEE-DETAILS-TABLE 

AWS-EMPLOYEE-DETAILS-TABLE
Column Name Datatype Attributes

employee_alphanumeric 

String primary-partition-key

employee_unique_id

Number primary-sort-key

employee_name

String

isActive

Boolean

employee_previous_organizations

StringSet

employee_previous_organizations_id

NumberSet

employee_detail

Map

employee_secondary_job_titles

List

employee_fax_info

nullvalue

Table 2: AWS-EMPLOYEE-SALARY-TABLE 

AWS-EMPLOYEE-SALARY-TABLE
Column Name Datatype Attributes

employee_unique_id

Number primary-partition-key

employee_salary

Number

employee_currency

String
employee_department  String

Getting Started

Create a sample Mule application in Anypoint Studio, as shown below.  

Let's start with our first operation.

1. Create Table 

This operation will create a new table, with all provided configurations.

Create table

Provided configurations

2. Describe Table 

This operation is used to get information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.

Describe table

Response: 

JSON
 
{
    "globalSecondaryIndexes": null,
    "latestStreamLabel": null,
    "latestStreamArn": null,
    "keySchema": [
        {
            "attributeName": "employee_alphanumeric",
            "keyType": "HASH"
        },
        {
            "attributeName": "employee_unique_id",
            "keyType": "RANGE"
        }
    ],
    "provisionedThroughput": {
        "writeCapacityUnits": 500,
        "readCapacityUnits": 500,
        "numberOfDecreasesToday": 0,
        "lastIncreaseDateTime": null,
        "lastDecreaseDateTime": null
    },
    "tableStatus": "ACTIVE",
    "tableName": "AWS-EMPLOYEE-DETAILS-TABLE",
    "tableArn": "xxx:aws:dynamodb:xx-xxxx-xx:xxxxxxxxxxx:table/AWS-EMPLOYEE-DETAILS-TABLE",
    "itemCount": 0,
    "tableSizeBytes": 0,
    "streamSpecification": null,
    "attributeDefinitions": [
        {
            "attributeType": "STRING",
            "attributeName": "employee_alphanumeric"
        },
        {
            "attributeType": "NUMBER",
            "attributeName": "employee_unique_id"
        }
    ],
    "localSecondaryIndexes": null,
    "creationDateTime": "2022-02-17T10:54:51.339"
}

3. List Tables 

This operation will return all the table names associated with your current AWS account and endpoint.

List tables

Response: 

JSON
 
{
    "tableNames": [
        "sample-table-name-1",
        "sample-table-name-2",
        "sample-table-name-3",
        "sample-table-name-4",
        "sample-table-name-5"
    ],
    "lastEvaluatedTableName": "sample-table-name-5"
}

4. Put Item 

Use this operation when the requirement is to create a new item or replace an existing item in the database. If an item that has the same primary key as a new item already exists in a specified table, the new item replaces an existing item.

Put item

The below request will insert a single record into table 'AWS-EMPLOYEE-DETAILS-TABLE':

JSON
 
{
	"employee_alphanumeric": {
		"S": "ALPHA1"
	},
	"employee_unique_id": {
		"N": 1
	},
	"employee_name": {
		"S": "John"
	},
	"isActive": {
		"Bool": true
	},
	"employee_previous_organizations": {
		"ss": ["Google",
      	"Microsoft",
      	"Meta/Facebook"]
	},
	"employee_previous_organizations_id": {
		"ns": [123456,
      213456,
      654321]
	},
	"employee_detail": {
		"M": {
			"unique_id": {
				"N": 1
			},
			"residential": {
				"M": {
					"city": {
						"S": "New York"
					},
					"country": {
						"S": "United States"
					},
					"countryCode": {
						"N": "212"
					},
					"contact_detail": {
						"N": "9876543210"
					},
					"employee_fax_info": {
						"nullvalue": true
					}
				}
			}
		}
	},
	"employee_secondary_job_titles": {
		"L": [{
			"S": "Mulesoft Architect"
		},
      {
			"S": "Technical Lead"
		},
      {
			"S": "Senior Associate"
		},
      {
			"S": "Senior Mulesoft Developer"
		}]
	}
}

5a. Batch Put Item: Single Item

This operation inserts multiple records/items in one or more tables.

Batch Put Item: Single Item

The below request has 2 items with a unique combination of primary key and sort key. Once executed, it inserts both of these items in a single table "AWS-EMPLOYEE-DETAILS-TABLE".

JSON
 
{
	"AWS-EMPLOYEE-DETAILS-TABLE": [{    //Table1
		"PutRequest": {					// Item 1
			"employee_alphanumeric": {
				"S": "ALPHA2"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 2
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_name": {
				"S": "Peter"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"isActive": {
				"Bool": true
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations": {
				"ss": ["IBM","Tesla","LinkedIn"]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations_id": {
				"ns": [911123,4697896,654111]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_detail": {
				"M": {
					"unique_id": {
						"N": 2
					},
					"residential": "M": {
						"city": {
							"S": "New York"
						},
						"country": {
							"S": "United States"
						},
						"countryCode": {
							"N": "212"
						},
						"contact_detail": {
							"N": "9878987654"
						},
						"employee_fax_info": {
							"nullvalue": true
						}
					}
				}
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_secondary_job_titles": {
				"L": [{
					"S": "Mulesoft Architect"
				},{
					"S": "Senior Mulesoft Lead"
				}]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	}  as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	},
         	{
          "PutRequest": {					// Item 2
			"employee_alphanumeric": {
				"S": "ALPHA3"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 3
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_name": {
				"S": "Kale"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"isActive": {
				"Bool": true
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations": {
				"ss": ["Alphabet","Skelia"]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations_id": {
				"ns": [456843,1695334]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_detail": {
				"M": {
					"unique_id": {
						"N": 3
					},
					"residential": "M": {
						"city": {
							"S": "New York"
						},
						"country": {
							"S": "United States"
						},
						"countryCode": {
							"N": "212"
						},
						"contact_detail": {
							"N": "5633213210"
						},
						"employee_fax_info": {
							"nullvalue": true
						}
					}
				}
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_secondary_job_titles": {
				"L": [{
					"S": "Mulesoft Director"
				},{
					"S": "Mulesoft Practice Lead"
				}]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	}  as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	}]
}

5b. Batch Put Item: Multiple Table

This operation inserts multiple records or items in one or more tables. This example shows how to insert multiple records in multiple tables.

Batch put item: Multiple tableThe request below has in total 5 items with a unique combination of primary key and sort key. This request will insert two items in table "AWS-EMPLOYEE-DETAILS-TABLE" and three items in table "AWS-EMPLOYEE-SALARY-TABLE".

JSON
 
{
	"AWS-EMPLOYEE-DETAILS-TABLE": [{
		"PutRequest": {
			"employee_alphanumeric": {
				"S": "ALPHA2"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 2
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_name": {
				"S": "Peter"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"isActive": {
				"Bool": true
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations": {
				"ss": ["IBM","Tesla","LinkedIn"]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations_id": {
				"ns": [911123,4697896,654111]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_detail": {
				"M": {
					"unique_id": {
						"N": 2
					},
					"residential": "M": {
						"city": {
							"S": "New York"
						},
						"country": {
							"S": "United States"
						},
						"countryCode": {
							"N": "212"
						},
						"contact_detail": {
							"N": "9878987654"
						},
						"employee_fax_info": {
							"nullvalue": true
						}
					}
				}
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_secondary_job_titles": {
				"L": [{
					"S": "Mulesoft Architect"
				},{
					"S": "Senior Mulesoft Lead"
				}]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	}  as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	},
         	{
		"PutRequest": {
			"employee_alphanumeric": {
				"S": "ALPHA3"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 3
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_name": {
				"S": "Kale"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"isActive": {
				"Bool": true
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations": {
				"ss": ["Alphabet","Skelia"]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_previous_organizations_id": {
				"ns": [456843,1695334]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_detail": {
				"M": {
					"unique_id": {
						"N": 3
					},
					"residential": "M": {
						"city": {
							"S": "New York"
						},
						"country": {
							"S": "United States"
						},
						"countryCode": {
							"N": "212"
						},
						"contact_detail": {
							"N": "5633213210"
						},
						"employee_fax_info": {
							"nullvalue": true
						}
					}
				}
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_secondary_job_titles": {
				"L": [{
					"S": "Mulesoft Director"
				},{
					"S": "Mulesoft Practice Lead"
				}]
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	}  as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	}],
	"AWS-EMPLOYEE-SALARY-TABLE": [{
		"PutRequest": {
			"employee_unique_id": {
				"N": 1
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_salary": {
				"N": 100000
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_currency": {
				"S": "US DOLLAR"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_department": {
				"S": "Information Technology"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	},
		
			{
		"PutRequest": {
			"employee_unique_id": {
				"N": 2
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_salary": {
				"N": 200000
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_currency": {
				"S": "US DOLLAR"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_department": {
				"S": "Information Technology"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	},
		{
		"PutRequest": {
			"employee_unique_id": {
				"N": 3
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_salary": {
				"N": 300000
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_currency": {
				"S": "US DOLLAR"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_department": {
				"S": "Information Technology"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.WriteRequest"
	}]
}

6. Get Item

The Get Item operation returns a set of attributes for the item with the given primary key. If there is no matching item, Get Item does not return any data.

Get Item

7a. Batch Get Item: Single Item

The batch Get Item operation returns the attributes of one or more items from one or more tables. You identify the requested item by primary key and sort key combination.

Batch Get Item: Single tableThe below request has 2 items with their own primary key and sort key. This request will search for both records in table "AWS-EMPLOYEE-DETAILS-TABLE".

JSON
 
{
	"AWS-EMPLOYEE-DETAILS-TABLE" : {
        		"Keys": [
            		{ 
               			"employee_alphanumeric" : {"S":"ALPHA1"} as Object {class:"org.mule.extension.dynamodb.api.model.AttributeValue"},
               			"employee_unique_id":{"N": 1} as Object {class:"org.mule.extension.dynamodb.api.model.AttributeValue"}
               		},
               		{
               			"employee_alphanumeric" : {"S":"ALPHA2"} as Object {class:"org.mule.extension.dynamodb.api.model.AttributeValue"},
               			"employee_unique_id":{"N": 2} as Object {class:"org.mule.extension.dynamodb.api.model.AttributeValue"}
               		}
         	]
      } as Object {class:"org.mule.extension.dynamodb.api.model.KeysAndAttributes"}
}

7b. Batch Get Item: Multiple Table 

The batch Get Item operation returns the attributes of one or more items from one or more tables. You identify the requested item by primary key.

Batch Get Item: Multiple Table

The below request has a total of 4 items with their own primary key and sort key. This request will search for two records in table "AWS-EMPLOYEE-DETAILS-TABLE" and the remaining 2 records in table "AWS-EMPLOYEE-SALARY-TABLE".

JSON
 
{
	"AWS-EMPLOYEE-DETAILS-TABLE": {
		"Keys": [{
			"employee_alphanumeric": {
				"S": "ALPHA1"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 1
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		},
               		{
			"employee_alphanumeric": {
				"S": "ALPHA2"
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 2
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}]
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.KeysAndAttributes"
	},
	"AWS-EMPLOYEE-SALARY-TABLE": {
		"Keys": [{
			"employee_unique_id": {
				"N": 1
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		},
               		{
			"employee_unique_id": {
				"N": 2
			} as Object {
				class:"org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}]
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.KeysAndAttributes"
	}
}

8. Update Item 

This operation edits an existing item's attributes or adds a new item to the table if it does not already exist.

Update Item
Update Expression

Attribute ValuesThe below request will search for an item with a primary key and sort key combination, and update "isActive" = "false" and "employee_name" = "Prashant G" (as per the above connector configurations).

JSON
 
{
	"employee_alphanumeric": {"S": "ALPHA1"} as Object {
		class:"org.mule.extension.dynamodb.api.model.AttributeValue"
	},
	"employee_unique_id": {"N": 1} as Object {
		class:"org.mule.extension.dynamodb.api.model.AttributeValue"
	}
}

9. Delete Item 

This operation deletes a single item in a table. Items are identified using a primary key and sort key combination.

Delete Item

The below request will delete an item from table "AWS-EMPLOYEE-DETAILS-TABLE", with the primary key as "Alpha1" and the sort key as "1".

JSON
 
{
	"employee_alphanumeric": {
		"S": "ALPHA1"
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.AttributeValue"
	},
	"employee_unique_id": {
		"N": 1
	} as Object {
		class:"org.mule.extension.dynamodb.api.model.AttributeValue"
	}
}

10a. Batch Delete Item: Single Table

This operation deletes multiple items in one or more tables.

Delete Item: Single Table

The below request will search for 2 items in table "AWS-EMPLOYEE-DETAILS-TABLE" and delete them.

JSON
 
{
	"AWS-EMPLOYEE-DETAILS-TABLE": [{
		"DeleteRequest": {
			"employee_alphanumeric": {
				"S": "ALPHA2"
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": "2"
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class : "org.mule.extension.dynamodb.api.model.WriteRequest"
	},
{
		"DeleteRequest": {
			"employee_alphanumeric": {
				"S": "ALPHA3"
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": "3"
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class : "org.mule.extension.dynamodb.api.model.WriteRequest"
	}]
}

10b. Batch Delete Items: Multiple Table

This operation deletes multiple items in one or more tables.

Delete Items: Multiple tablesThe below request has in total 4 items with primary key and sort key combinations. The respective two items will be deleted from table "AWS-EMPLOYEE-DETAILS-TABLE" and the remaining two will be deleted from table "AWS-EMPLOYEE-SALARY-TABLE".

JSON
 
{
	"AWS-EMPLOYEE-DETAILS-TABLE": [{
		"DeleteRequest": {
			"employee_alphanumeric": {
				"S": "ALPHA2"
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 2
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class : "org.mule.extension.dynamodb.api.model.WriteRequest"
	},
{
		"DeleteRequest": {
			"employee_alphanumeric": {
				"S": "ALPHA3"
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			},
			"employee_unique_id": {
				"N": 3
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class : "org.mule.extension.dynamodb.api.model.WriteRequest"
	}],
	"AWS-EMPLOYEE-SALARY-TABLE": [{
		"DeleteRequest": {
			"employee_unique_id": {
				"N": 2
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class : "org.mule.extension.dynamodb.api.model.WriteRequest"
	},
{
		"DeleteRequest": {
			"employee_unique_id": {
				"N": 3
			} as Object {
				class: "org.mule.extension.dynamodb.api.model.AttributeValue"
			}
		}
	} as Object {
		class : "org.mule.extension.dynamodb.api.model.WriteRequest"
	}]
}

Conclusion

We have seen the working examples of 10 operations of Dynamo DB connector, with 14 different JSON request formats. The remaining operations will be continued in our next section, Part 2.

Stay Tuned.  Thank You and Happy Learning!

Database Relational database DYNAMO (programming language) Connector (mathematics) Requests JSON Sort (Unix)

Opinions expressed by DZone contributors are their own.

Related

  • Kafka JDBC Source Connector for Large Data
  • Handle HL7 MLLP Messages With Mule 4
  • Introduction to Couchbase for Oracle Developers and Experts: Part 4: Data Modeling
  • Introduction to Couchbase for Oracle Developers and Experts: Part 2 - Database Objects

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: