I'm using DMS to create an on-going task that will deploy data from my production database to the development one. However, the PII must be masked so I'm creating a set of rules to do that.
It's easier for the developers if the length of the data in each row is still the same as in production. So I created a rule to preserve the first letter and add some x after.
This is my transformation schema:
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "mydatabase",
"table-name": "my_table"
},
"rule-action": "include"
},
{
"rule-type": "transformation",
"rule-id": "2",
"rule-name": "2",
"rule-action": "add-column",
"rule-target": "column",
"object-locator": {
"schema-name": "mydatabase",
"table-name": "my_table"
},
"value": "TMPcontact_name",
"expression": "substr($contact_name, 0, 2) || replace(printf('%.' || length($contact_name) || 'c', '/'), '/', 'x')",
"data-type": {
"type": "string",
"length": "50"
}
},
{
"rule-type": "transformation",
"rule-id": "3",
"rule-name": "3",
"rule-action": "remove-column",
"rule-target": "column",
"object-locator": {
"schema-name": "mydatabase",
"table-name": "my_table",
"column-name": "contact_name"
}
},
{
"rule-type": "transformation",
"rule-id": "4",
"rule-name": "4",
"rule-action": "rename",
"rule-target": "column",
"object-locator": {
"schema-name": "mydatabase",
"table-name": "my_table",
"column-name" : "TMPcontact_name"
},
"value": "contact_name"
}
]
}
The problem is that DMS is ignoring the rule #4. After the process is finished, the name of the column in the target is TMPcontact_name. The logs in CW does not contain any error or notice related to that. I could not find any related documentation.