Both databases are in Aurora MySql
In the source database I've a table with serveral fields and the primary key uses only one column 'id'.
In the target database, I need to change the primary key to use two columns: 'platform' + 'id'.
When launch the migratrion task, the target table is created but the primary key is the same as in the source (only with the 'id' column).
This is the JSON of the rules:
{
"rules": [
{
"rule-type": "selection",
"rule-id": "10",
"rule-name": "10",
"object-locator": {
"schema-name": "bbdd_in%",
"table-name": "str_course_cat%"
},
"rule-action": "include",
"filters": []
},
{
"rule-type": "transformation",
"rule-id": "21",
"rule-name": "21",
"rule-target": "schema",
"object-locator": {
"schema-name": "%",
"table-name": "%"
},
"rule-action": "rename",
"value": "dw"
},
{
"rule-type": "transformation",
"rule-id": "22",
"rule-name": "22",
"rule-target": "column",
"object-locator": {
"schema-name": "%",
"table-name": "%"
},
"rule-action": "add-column",
"value": "platform",
"expression": "$AR_M_SOURCE_SCHEMA",
"data-type": {
"type": "string",
"length": "50",
"scale": ""
}
},
{
"rule-type": "transformation",
"rule-id": "23",
"rule-name": "23",
"rule-target": "table",
"object-locator": {
"schema-name": "%",
"table-name": "%"
},
"rule-action": "define-primary-key",
"primary-key-def": {
"name": "PRIMARY",
"origin": "primary-key",
"columns": [
"platform",
"id"
]
}
}
]
}
Hello Javier There are few limitations around how many transformation rules can be applied for a given object Please see if this is the case in your scenario. Here is the link that can provide guidance on this scenario: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Transformations.html