This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/020_guides/managing_data_properties/value_mapping.md. For the complete documentation index, see llms.txt.

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.