Mapping expressions on read and on write
Allows transforming columns as they are being read from the input database and written to the output database.
For example, a column might need a cast to a different type on read and then a cast back to the original type on write. The following configuration might be provided to address that:
tables:
- table_name_with_schema: "test_schema.test_table"
mode: "MASKING"
transformations:
- columns: ["my_binary_column"]
mapping:
read: "cast(? as char)"
write: "cast(? as binary)"
The my_binary_column
will be cast to char
type on read and the result of transformation will be cast back to
binary
type on write.