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:

The JSON below contains nested fields under “Employee” such as “Id,” “Name,” “Permanent,” and “Address.” Using the Field Flattener, you can flatten these nested fields, including “Street,” “City,” and “Zipcode,” as shown in the example.

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

After applying the Field Flattener, the nested fields are flattened into a single level.

flattened-json-output

Processor Configuration

Fields: Option to select the fields to flatten.

Include Arrays: Option to enable include arrays.

Distinct Record: Option to omit records that contain duplicate data in the selected fields.

Add Configuration: Enables to add Additional properties.

Top