Hello,

I’m not sure that I fully understand what you’re trying to do.

I *think* what you’re saying is that you want to something like:

If (a == “hello”) then set b to “good-bye”

Is that correct?

If so, then that is done in UpdateRecord by adding a property with name:

/b[/a = ‘hello’]

And value:

good-bye

So this would say set the value of field found at /b to “good-bye” but only if 
the predicate (/a = ‘hello’) is true.

Thanks
-Mark


________________________________
From: agathis <[email protected]>
Sent: Wednesday, November 18, 2020 1:43 AM
To: [email protected] <[email protected]>
Subject: SQL case-like in UpdateRecord of QueryRecord

Hi everyone!

After an upgrade from 1.1 to 1.9 I'm exploring the new record-based NiFi 
paradigm.
What I need now is (in SQL) something like select case when column = 'value' 
then 'some text' end new_column from flowfile
It doesn't work as expected in QueryRecord (and it gets even worse if I use 
non-latin symbols in the query).
And I didn't find anything to this effect in UpdateRecord syntax.

Is it possible to implement without reading record attributes to ff attributes?

Reply via email to