How do I use transformations in AWS DMS?

Last updated: 2019-06-17

How do I use transformations in AWS Database Migration Service (AWS DMS)?

Resolution

You can use transformations to modify a schema, table, or column. For example, you can rename, add, replace, or remove a prefix or suffix for a table, or change the table name to uppercase or lowercase. You can define your transformation rules by using the AWS Command Line Interface (AWS CLI) or API, or by using the AWS DMS console.

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Choose Create task.
  3. Enter the details for Task configuration and Task settings.
  4. Select Enable CloudWatch logs.
  5. From the Table mappings section, choose Guided UI. You can also choose JSON editor to enter the mappings in JSON format.
  6. Expand the Selection rules section, choose Add a new selection rule.
  7. Enter a Schema and Table name.
  8. From Action, select Include or Exclude.
    Note: You can add multiple selection rules by choosing Add new selection rule and then entering the details for your selection rule. You must have at least one selection rule to use transformations.
  9. Expand the Transformation rules section, and then choose Add a new transformation rule.
  10. Choose a Target by selecting Schema, Table, or Column.
    Note: If you choose Column, you must enter the Schema, Table, and Column names. If you choose Table, you must enter the Schema and Table names only. If you choose Schema, you must enter the Schema name only.
  11. From Action, select one of the following:
    Rename to
    Remove column (Unavailable if you choose Schema or Table as the target)
    Make lowercase
    Make uppercase
    Add prefix
    Remove prefix
    Replace prefix
    Add suffix
    Remove suffix
    Replace suffix
  12. Choose Add a new transformation rule to save the transformation rule.
  13. Choose Create task.

To add transformations to a task that already exists, choose Database migration tasks from the navigation pane. Select your task, choose Actions, and then choose Modify. From the Table mappings section, expand Selection rules, and then choose Add new selection rule. To add more transformations, expand Transformation rules, choose Add a new transformation rule, and then choose Save.


Did this article help you?

Anything we could improve?


Need more help?