Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
MaskField¶
The following provides usage information for the Apache Kafka® 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.
"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¶
Name | Description | Type | Default | Valid Values | Importance |
---|---|---|---|---|---|
fields |
Names of fields to mask. | list | non-empty list | high |