@Anderosn,
Another option is to use the UpdateRecod with an Avro schema in the JsonRecordSetWriter that reflects the actual json structure coming out of the ExecuteSQL
The UpdateRecord will look like this:

The JsonRecorSetWriter looks like this:

The AvroSchema provided in the ShemaText property is the following:
{
"name": "nifi",
"type": "record",
"namespace": "nifi.com",
"fields": [
{
"name": "SEARCH_RESULT",
"type": {
"name": "SEARCH_RESULT",
"type": "record",
"fields": [
{
"name": "requestId",
"type": "string"
},
{
"name": "responseData",
"type": {
"name": "responseData",
"type": "array",
"items": {
"name": "responseData",
"type": "record",
"fields": [
{
"name": "searchKey",
"type": "string"
},
{
"name": "data",
"type": {
"name": "data",
"type": "array",
"items": {
"name": "data",
"type": "record",
"fields": [
{
"name": "firstName",
"type": "string"
},
{
"name": "lastName",
"type": "string"
}
]
}
}
}
]
}
}
}
]
}
}
]
}
This will produce the following output json out of the UpdateRecord:
[ {
"SEARCH_RESULT" : {
"requestId" : "203680",
"responseData" : [ {
"searchKey" : "cardNumber",
"data" : [ {
"firstName" : "Martin",
"lastName" : "Garry"
}, {
"firstName" : "Martin",
"lastName" : "Garry"
}, {
"firstName" : "Martin",
"lastName" : "Garry"
} ]
} ]
}
} ]
You can use EvaluateJsonPath to get the data as json array to do the needed processing.
If that helps please accept solution.
Thanks