I have the below rule for aws dms replication task. It copies rateattribute table from Test schema to target db sync-test schema. But it doesn't add a new column.
{
"rules": [
{
"rule-type": "transformation",
"rule-id": "929406550",
"rule-name": "929406550",
"rule-target": "column",
"rule-action": "add-column",
"object-locator": {
"schema-name": "Test",
"table-name": "rateattribute"
},
"value": "datacheck",
"expression": "$LastModifiedTime",
"data-type": {
"type": "string",
"length": 50
}
},
{
"rule-type": "selection",
"rule-id": "812938400",
"rule-name": "812938400",
"object-locator": {
"schema-name": "Test",
"table-name": "rateattribute"
},
"rule-action": "include",
"filters": []
},
{
"rule-type": "transformation",
"rule-id": "852878650",
"rule-name": "852549480",
"rule-target": "schema",
"object-locator": {
"schema-name": "Test"
},
"rule-action": "rename",
"value": "sync-test",
"old-value": null
}
]
}
Any help would be really appreciated!
When copying data from source sql server to redsfhift, datetime2(7) column getting saved as varchar(37). Am trying to transform it to datetime. So am trying a tweak to add a column first with removing precision from datetime2 column values. Once it works, will add a new column to convert this to datetime