Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I implement If-ElseIf-Else condition in Nifi

Tags:

apache-nifi

In NiFi,
I have a JSON data coming in, and I am using SplitJson and EvaluateJson to store the required components of the Json data in my own variable.

How can I implement an if-elseif-else condition on the Json data value?

For example, if attributeA==0, relationship = pass, else fail, and so on.

like image 560
Bipal Shakya Avatar asked Feb 20 '17 21:02

Bipal Shakya


1 Answers

You will use the RouteOnAttribute processor with dynamic properties that evaluate the NiFi Expression Language against the provided attributes. Here are sections of the documentation on boolean operations and evaluating multiple attributes.

like image 80
Andy Avatar answered Sep 24 '22 21:09

Andy