I am using NiFi Flow as ListFile >> FetchFile >> SplitJson >> UpdateAttribute >> FlattenJson >> InferAvroSchema >> ConvertRecord >> MergeRecord >> PutParquet.
Json Input :
[{
"Id": 1235,
"Username": "fred1235",
"Name": "Fred",
"ShippingAddress": {
"Address1": "456 Main St.",
"Address2": "",
"City": "Durham",
"State": "NC"
}
},{
"Id": 1236,
"Username": "larry1234",
"Name": "Larry",
"ShippingAddress": {
"Address1": "789 Main St.",
"Address2": "",
"City": "Durham",
"State": "NC",
"PostalCode": 277453
},
"Orders": [{
"ItemId": 1111,
"OrderDate": "11/11/2012"
}, {
"ItemId": 2222,
"OrderDate": "12/12/2012"
}]
}]
MergeRecord Processor not giving "Orders": array in merged file schema. Same issue with MergeContent processor.