.. _maskfield: .. meta:: :description: This document provides usage information for the Apache Kafka SMT org.apache.kafka.connect.transforms.MaskField. ========= MaskField ========= The following provides usage information for the |ak-tm| SMT ``org.apache.kafka.connect.transforms.MaskField``. Description ----------- 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``). Example ------- This configuration snippet shows how to use ``MaskField`` to mask the value of a field. .. sourcecode:: properties "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":""}`` Properties ---------- .. list-table:: :header-rows: 1 :widths: 15 30 10 10 10 10 * - Name - Description - Type - Default - Valid Values - Importance * - ``fields`` - Names of fields to mask. - list - - non-empty list - high