0

I'm trying to setup replication between two MySQL RDS instances for one table only. I would like to replicate for example, schema1.users to schema2.users.

Under Mapping rules, I'm able to specify the schema and table names but I think they are for source only but I can't seem to find anything about specifying target schema and table name.

Thus I would like to know if it's a limitation of this service or am I missing something.

Kelvin Low
  • 678
  • 1
  • 10
  • 23

1 Answers1

0

In you case, you can try the rule below

{
    "rules": [
      {
        "rule-type": "selection",
        "rule-id": "1",
        "rule-name": "1",
        "object-locator": {
          "schema-name": "schema1",
          "table-name": "users"
        },
        "rule-action": "include"
      },
      {
        "rule-type": "transformation",
        "rule-id": "2",
        "rule-name": "2",
        "rule-target": "schema",
        "object-locator": {
          "schema-name": "schema1"
        },
        "rule-action": "rename",
        "value": "schema2"
      }
    ]
  }

It should replicate the users table from the schema1 to the schema2

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Transformations.html