0

In a json source field we have some pII data that needs to be removed. is there any transformation rule similar to regexp_replace that could be applied to look for specific json tag and remove/replace in a dms task?

1 Answers1

0

I have not tried it, but I believe you can use a transformation rule with an expression similar to the one below.

Assuming the column with the json is named json_column and the "tag" is four consecutive digits:

"expression": "CASE WHEN $json_column glob '[0-9][0-9][0-9][0-9]' THEN 'Redacted-number' ELSE $json_column END"

See https://aws.amazon.com/blogs/database/data-masking-using-aws-dms/

If you are still having trouble Amazon re:Post has been helpful for me for DMS questions.

John Hamel
  • 43
  • 4