Field Flattener Processor
In this article
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.
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”
}
}
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.
If you have any feedback on Gathr documentation, please email us!