nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Bende <bbe...@gmail.com>
Subject Re: NiFi Expression Language in UpdateAttribute
Date Thu, 11 Jun 2020 14:24:45 GMT
Hello,

The EL docs have some good examples:

https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#ifelse

-Bryan


On Thu, Jun 11, 2020 at 10:14 AM Russell Bateman <russ@windofkeltia.com>
wrote:

> I wnat to create an attribute, format-type, which I hoped would be set
> based on the in-coming flowfile name:
>
>     ${ ${filename:endsWith( 'xml' )} : ifElse( 'XML', 'JSON' ) }
>
> If the in-coming flowfile name is *sample.xml*, the result is
> nevertheless and always
>
>     format-type = JSON
>
> I want it to be XML, obviously. What have I screwed up in my NEL syntax?
>
> (Yes, I have tried taking out all the white space.)
>
> Thanks,
> Russ
>

Mime
View raw message