Search code examples
apache-kafkatransformationapache-kafka-connect

Kafka Connect: SMT for conditional replacement of field values


I know there are transform actions available for example MaskField to mask fields value. I have a requirement where I need to do conditional masking i.e set value to NULL only if the same field has a specific value. For example:

IF field_1 == 'HELLO' THEN
 SET field_1 = null
ELSE
 NO TRANSFORM

Solution

  • There's no currently any SMT that supports the conditional replacement of a field value.


    You can however, write your own Single Message Transform as described here.