AWS Database Blog

Modifying Tasks and Table Mapping in the Console in AWS Database Migration Service

We’ve recently added two features in AWS Database Migration Service (AWS DMS)—modifying tasks and table mapping through the AWS Management Console.

These two new features represent a new step in our long journey to improve and enhance our migration and replication service based on the feedback we receive from our customers.

Let’s outline some highlights of modifying tasks and table mapping through the console.

Modifying tasks
In the past, users had to use the AWS CLI to modify tasks or delete and recreate the migration task to modify a task’s settings in the AWS Management Console. Now, you can modify most of the settings while the task is in stopped mode by using the console. You modify a task in the DMS console by simply selecting the task and choosing the Modify button. You can also use the AWS CLI or AWS DMS API command ModifyTask.

This new capability gives you the flexibility to make the necessary adjustments to migration or replication projects without the need to delete and recreate a task. For example, you can now change the log level of a DMS task or change the table mapping between source and target databases.

For more information about this new feature, see the DMS documentation.

Table mapping through the console
With table mapping, you can specify the tables from a source database that you want to migrate to a target database. The simplest mapping is to migrate all the tables from a source database to a target without any modifications. You can also use table mapping to specify individual tables in the source database to migrate and the schema to use for the migration. In addition, you can use filters to specify what data from a given table column you want replicated to the target database.

Until this feature’s addition, you performed table mapping by creating and modifying a JSON file. Now, users can now use the console to perform table mapping, including specifying table selection and transformations. In the console user interface, you use the Where section to specify the schema, table, and action (include or exclude). In addition, you can use transformations from the console to rename a schema or table, add a prefix or suffix to a schema or table, or remove a table column.

How to set up table-mapping selection rules for a table
The following procedure shows how to set up selection rules for a table called Customers in a schema called EntertainmentAgencySample. You create selection rules and transformations on the Guided tab, which only appears when you have a source endpoint that has schema and table information.

  1. Sign in to the AWS Management Console and choose AWS DMS.
  2. On the Dashboard page, choose Tasks.
  3. Choose Create Task.
  4. Type the task information, including Task nameReplication instanceSource endpointTarget endpoint, and Migration type. Choose the Guided tab in the Table mappings section.
  5. In the Table mapping section, choose the schema name and table name. You can use “%” as a wildcard value when specifying the table name. Specify the action to be taken, to include or exclude data defined by the filter.
  6. Specify filter information using the Add column filter and the Add condition links. First, choose Add column filter to specify a column and conditions. Then, choose Add condition to add additional conditions. The following example shows a filter for the Customers table that includes AgencyID values between 01 and 85.
  7. When you have created the selection rules you want, choose Add selection rule.
  8. After you have created at least one selection rule, you can add a transformation to the task. To do so, choose add transformation rule.
  9. Choose the target you want to transform and enter the additional information requested. The following example shows a transformation that deletes the AgencyStatus column from the Customers table.
  10. Choose Add transformation rule.
  11. You can add additional selection rules or transformations by selecting add selection rule or add transformation rule. When you are finished, choose Create task.

For more information about table mapping using the console, see the DMS documentation.

For more information about AWS Database Migration Service in general, see our website.

About the Author

Eran Schitzer is a product manager for Database Migration Services at Amazon Web Services.