0
votes

I have a source which produce json data and each file contains only one record as below file1:-

{"X":"12","Y":"23","r":"3","V":"0"}

file2:-

{"r":"32","Y":"24","x":"3","V":"12"}

file3:-

 {"v":"1","r":"23","x":"3","y":"23"}

now in nifi I want to filter all files if y=23 and v=0 to one destination and remaining to different destination. can any one help me

my nifi flow:- enter image description here

my route on attribute processor enter image description here

can any one please help my to write a condition so that i can filter data as per above requirements

1
Use expression functions equals & and. nifi.apache.org/docs/nifi-docs/html/…daggett

1 Answers

1
votes

Extract the values for y,v in EvaluateJSONPath processor and add new expression in RouteOnAttribute processor to filter out required flowfiles.

Try with below expression using NiFi expression language:

${y:equals('23'):and(${v:equals('0')})}