Create a mapping to read data from an on-premise MySQL database and write data to an Amazon Redshift target for analysis. Configure AWS IAM authentication for secure and controlled access to Amazon Redshift resources when you run the mapping.
In Data Integration, click
New
Mappings
Create
.
The
New Mapping
dialog box appears.
Enter a name, location, and description for the mapping.
On the Source transformation, specify a name and description in the general properties.
On the
Source
tab, perform the following steps to provide the source details to read data from the MySQL source:
In the
Connection
field, select the MySQL source connection.
In the
Source Type
field, select the type of the source.
In the
Object
field, select the required object.
In the
Advanced Properties
section, provide the appropriate values.
On the
Fields
tab, map the MySQL source fields to the target fields.
On the Target transformation, specify a name and description in the general properties.
On the
Target
tab, perform the following steps to provide the target details to write data to the Amazon Redshift target:
In the
Connection
field, select the required target connection.
In the
Target Type
field, select the type of the target.
In the
Object
field, select the required object.
In the
Operation
field, select the required operation.
In the
Advanced Properties
section, provide appropriate values for the advanced target properties and ensure that you specify the AWS IAM ROLE that you created in the
CopyOptions Property File
field.
The Secure Agent writes the data to the required target when you specify the Amazon Redshift Role Resource Name (ARN) in the
CopyOptions Property File
field.
Verify that the Amazon S3 bucket and Amazon Redshift cluster reside in the same region.
Map the MySQL source and the Amazon Redshift target.
The following image shows a sample mapping:
Click
Save
Run
to validate the mapping.
In
Monitor
, you can monitor the status of the logs after you run the task.
Click
Action
New Mapping Task
on the left corner of the task wizard.
The
Mapping Task
page appears.
Provide a name of the mapping task and select the runtime environment.
The mapping that you created is selected automatically.