Extract field from flow files to comma separated batches
I have a flow that extracts an ID from a flow file, then does an ExectueSQL to fetch some additional data. Since this is one at a time, it's very inefficient (~300 records per minute - which doesn't sound bad until it's processing a million records).
Is there a way to run flow files through a process and extract the required value in batches of 50 or 100 so that it returns a comma-separated value (like 123, 124, 125, 126, ... etc.) to pass to the ExecuteSQL so it's returning data in larger batches instead of one at a time?
Currently, it's doing an EvaluateJsonPath, pulling that one value to a property so the ExecuteSQL processor can construct the SQL like "SELECT * FROM TABLE_NAME WHERE KEY = ${key}". I'd like to modify that so it's "...WHERE KEY IN (${keyList})" and keyList is the comma-separated list created above.
Not sure how to approach this, however.

