You are viewing documentation for an older version of Confluent Platform. For the latest, click here.


The following provides usage information for the Apache Kafka® SMT org.apache.kafka.connect.transforms.MaskField.


Mask specified fields with a valid null value for the field type (i.e. 0, false, empty string, and so on).

Use the concrete transformation type designed for the record key (org.apache.kafka.connect.transforms.MaskField$Key) or value (org.apache.kafka.connect.transforms.MaskField$Value).


This configuration snippet shows how to use MaskField to mask the value of a field.

"transforms": "MaskField",
"transforms.MaskField.type": "org.apache.kafka.connect.transforms.MaskField$Value",
"transforms.MaskField.fields": "string_field"

This masks string_field, transforming the original message as seen here:

{"integer_field":22, "string_field":"foo"}

into the result here:

{"integer_field":22, "string_field":""}


Name Description Type Default Valid Values Importance
fields Names of fields to mask. list   non-empty list high