Data Synchronization Example
You work in a marketing firm and business analysts in your organization need to analyze trends based on tweets on Twitter.
You use DynamoDB Connector to consolidate the tweets from various users and store the unstructured data in DynamoDB tables.
Configure a data synchronization task to consolidate the tweets based on username and store them in an existing DynamoDB table.
You perform the following data synchronization tasks:
- Define the data synchronization task.
- Configure a data synchronization task to use the upsert operation.
- Create a Twitter source object.
- The source for the mapping is a Twitter object that contains the tweet details. The Twitter object is a single source in the data synchronization task. The Twitter object includes the TweetId, UserName, and Tweet source columns. Specify Tweets as the resource for the source object.
- Create a DynamoDB target object.
- The target for the mapping is a DynamoDB table. The DynamoDB object includes the UserName and AllTweets target columns. Provide a name test_twitter for the target object and specify the connection type as DynamoDB.
- Specify a data filter for the Twitter source object.
- Define a data filter for the Tweets source object. For example, you can filter by NoneOfTheseWords Equals 'Watch'.
- Configure a field mapping.
- Map the fields under Tweets source data to the fields in the test_twitter target object.
- To consolidate the tweets based on user name, enter the following lookup expression: concat((lookup( UserName=username ):test_twitter.tweets), Tweet
- When you run the task, the Data Synchronization application writes the mapped source data to the target DynamoDB table.
The following image shows the mapping of the Tweets source with the test_twitter target: