IF statement for NiFi attribute result - NiFi
Hello all
Within NiFi, updateAttribute processor I am trying to change an attribute called 'hive_database' based on the value of another attribute called 'hostname'.
For instance if:
#1: hostname = Mickey Mouse
#2: hostname = James Bond
I want to use a 'contains' statement (or similar ) to change the output of new attribute 'hive_database'
property:
hive_database
value:
${hostname:contains('Mickey'):<OUTPUT>('cartoon')} <OR>
${hostname:contains('Mickey'):<OUTPUT>('movie')}
So that #1 output would be: property= hive_database value= cartoon
The parts I'm stuck on is the OUTPUT and OR parts above, do you know if this would be possible using the update attribute processor? I am trying to avoid having to use routeOnAttribute to break out multiple different 'hosname' values to send data to the relevant 'hive_database'
Hope this makes sense, unable to share screenshots etc as sensitive vales.
Any help greatly appreciated.



