Data Synchronization Task Example
You work for an e-commerce organization that stores sales order details in a MySQL database. Your organization needs to move the data from the MySQL database to an Amazon Redshift target.
Configure a Data Synchronization task to write to Amazon Redshift.
You perform the following Data Synchronization tasks:
- Define the Data Synchronization task.
- Configure a Data Synchronization task to use the insert operation.
- Use a MySQL source object.
- The source for the mapping is a MySQL connection that contains the sales order details. The MySQL object is a single source in the Data Synchronization task. You can include the Customer ID, Item_codes, Item_quantity, and Price columns. Specify sales_order_details as the resource for the source object.
- Create an Amazon Redshift target object.
- Select the fields Customer_ID, Item_codes, Item_quantity, and Price from the source object that you want to insert into the target object. Provide a name sales_order_details for the target object and specify the connection type as MySQL. The Data Synchronization task writes the data to Amazon Redshift. You can also use an existing target object.
- Configure a field mapping.
- Map all the fields under sales_order_details source data to all the fields in the target sales_order_details. The Data Synchronization application writes the mapped source data to Amazon Redshift.
The following image shows the mapping of the sales_order_details source with the sales_order_details target in the location that you specified in the connection properties:
- Configure the advanced target properties.
- In the advanced target properties, you choose properties that are specific to Amazon Redshift. Specify an Amazon S3 bucket name for the Amazon Redshift target data. Use an S3 bucket in the same region as your Amazon Redshift cluster. You can also specify options for the copy command, and turn on server side and client side encryption. Save and run the task.
- Open Amazon Redshift to visualize the exported data.
The following image shows the data on Amazon Redshift.