Question
Dynamically filter flowFiles based on data from table
I'm trying to using NIFI dynamically filter flow Files in JSON format and keep only those values that are present is one SQL table.
I'm using QueryRecord processor, with query like:
SELECT * FROM FLOWFILE WHERE ${key} = ${value}
only those values that are present in QueryDatabaseTable variables should be kept.
Flow Files to be filtered looks like these:
[ { "CustomerID" : 1, "OrderNbr" : "12", "Amount":100 } ]
CustomerID field is the one to check and filter data.
My current NIFI flow:


