Reputation: 1
I am trying to replicate MySQL Aurora database to another MySQL Aurora. Always its creating the database with the same name as source. Is there any way to specify the target DB name? Mean, I want to replicate "x" table to A database to "x" table of B database.
A.x => B.x
Upvotes: 0
Views: 221
Reputation: 685
You can specify a table mapping rule for your DMS replication task as follows:
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "public",
"table-name": "%"
},
"rule-action": "include"
},
{
"rule-type": "transformation",
"rule-id": "2",
"rule-name": "2",
"rule-action": "rename",
"rule-target": "table",
"object-locator": {
"schema-name": "public",
"table-name": "old-table"
},
"value": "new-table"
}
]
}
This will copy all tables from public schema and rename just the one you specify.
Detailed documentation is here: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html
Upvotes: 0