2 Answers
- Newest
- Most votes
- Most comments
0
Have you tried using replace function to modify the contents as per https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Expressions.html#:~:text=%3A%2050%0A%7D%0A%7D-,Using%20SQLite%20functions%20to%20build%20expressions,-You%20use%20table
replace(x,y,z)
The replace(x,y,z) function returns a string formed by substituting string z for every occurrence of string y in string x.
I hope it helps.
answered 2 years ago
0
To solve this issue I added lambda to remove those characters.
I used to have the following flow:
Oracle DB -> AWS DMS -> S3 Bucket
Current:
Oracle DB -> AWS DMS -> S3 Bucket1 -> Lambda -> S3 Bucket2
answered 2 years ago
Relevant content
- asked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
What is the right syntax for the replace expression? I tried this, but didn't work:
"rule-action": "add-column" needed
which could look like this. It will select table, remove COL_NAME and lastly add new column UPDATED_COL_NAME with expression replace($COL_NAME, '\n','') this should work unless DMS is not supporting escape character \ in that case you can try updating the source table data to remove the \n
Or create a view which is replacing the \n in column but in that case only full load is supported.
It worked partially, I couldn't make it work for more than one character replacement. I tried
"expression": "replace(replace($COL_NAME, '\n',''), '\t', ' ')"
andreplace($COL_NAME, '/[\t\n]/g,'')
. Do you know how can I replace multiple characters in the same string?