I had a quick question regarding Amazon DMS transformation capabilities. So basically, I have a source database (MySQL) that I need to migrate to destination database (Aurora). During this migration we have a Primary Key called id
that needs to transferred as source_id
in the Aurora and we have another ID
field in the aurora whose value is some calculation done to the id
of the source. Basically as shown below:
Source DB (id) -----> Target DB (source_id)
Source DB (id) -----> Some Calculations (Example: id+50)-----> Target DB (ID)
Is this feasible via DMS ?
2
Answers
regarding your specific requirement, below the JSON rules to be applied to the replication task.
you could review link below to deep dive little more about transformation rules.
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Expressions.html
Here is the another custom rule, more specific for your requirement
Here is the code
You could review link below for dive deep.
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Transformations.html