Field Flattener Processor

Field Flattener allows you to flatten a nested record to produce a record with no nested fields, it can also flatten specific list or map fields.

By default, the new flattened fields is separated by “_”

Let’s take an example of a nested JSON.

Specify a path of input json in the record, so that it flattens all nested structures until the nested path is flat.

For example:

Flatten Example 1: The JSON below has nested fields under Employee, ID, Name, Permanent and Address. Now using the Field flattener, you will be able to flatten the nested fields i.e., Street, City, Zipcode as shown below:

{

  "Employee":{
      "Id":123,
      "Name":"Steve Rogers",
      "Permanent":true,
      "Address":{
        "Street":"El Camino Real",
        "City":"San Jose",
        "Zipcode":55014
      },
      "Role":"Developer"
   }
}

Field Flattener Processor Configuration

To add Field Flattener processor into your pipeline, drag the processor to the canvas and right click on it to configure as explained below:

FieldDescription
Flatten PathFlatten list and map fields that contains additional nested list or map fields. Specify the path to the field, for example: Employee.
Top