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.Flatten.


Flatten a nested data structure, generating names for each field by concatenating the field names at each level with a configurable delimiter character. Applies to a Struct when a schema is present, or a Map in the case of schemaless data. The Single Message Transforms (SMT) delimiter is ., which is also the default.

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

When using an Avro schema, the default SMT delimiter . cannot be used. Use _ for the delimiter. Use the following properties to change the delimiter:

"transforms": "flatten",
"transforms.flatten.type": "org.apache.kafka.connect.transforms.Flatten$Value",
"transforms.flatten.delimiter": "_"


The configuration snippet below shows how to use Flatten to concatenate field names with a delimiter character.

"transforms": "flatten",
"transforms.flatten.type": "org.apache.kafka.connect.transforms.Flatten$Value",
"transforms.flatten.delimiter": "."


  "content": {
    "id": 42,
    "name": {
      "first": "David",
      "middle": null,
      "last": "Wong"


  "": 42,
  "": "David",
  "": null,
  "": "Wong"


Name Description Type Default Valid Values Importance
delimiter Delimiter to insert between field names from the input record when generating field names for the output record. string . _ medium