2 Answers
- Newest
- Most votes
- Most comments
0
While the "Op" column cannot be renamed, you can add a new column (with your preferred column name) which shows the operation that was performed (i.e INSERT, UPDATE, or DELETE). This can be done using transformation rules and expression AR_H_OPERATION.
You can add the below transformation rule to add a new column named "operation_performed" which contains the operation that was performed:
{
"rule-type": "transformation",
"rule-id": "2",
"rule-name": "2",
"rule-target": "column",
"object-locator": {
"schema-name": "%",
"table-name": "%"
},
"rule-action": "add-column",
"value": "operation_performed",
"expression": "$AR_H_OPERATION",
"data-type": {
"type": "string",
"length": 50
}
}
Sample output for full loads:
Op,InitialLoadTimestamp,c1,c2,operation_performed
I,2024-07-19 05:01:17.084630,1,1,INSERT
Please refer to the following document for more details: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Expressions.html#CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Expressions-Headers
Relevant content
asked 2 years ago
asked 4 years ago
- AWS OFFICIALUpdated 3 years ago
