A transform chain is an ordered sequence of Kafka Connect single-message transforms. Each transform receives the preceding transform’s output, allowing several operations on one record. section 5.4
A practical chain can reshape and protect an incoming database record:
- ValueToKey copies the user_name field into the record key. section 5.4
- ExtractField$Key extracts user_name from the intermediate key, leaving the raw value as the key. section 5.4
- MaskField$Value replaces the ssn field with xxx-xx-xxxx, or with an empty type-appropriate value when no replacement is configured. section 5.4
Configured chain
Configure transforms as copyFieldToKey, extractKeyFromStruct, maskSsn. The intermediate structure becomes Struct {"user_name" : "artv"} before extraction, while the value’s ssn field is masked.
