nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devin Fisher <devin.fis...@perfectsearchcorp.com>
Subject Re: Expression Language 'getOrDefault'
Date Tue, 03 May 2016 12:28:24 GMT
Yes, that is perfect. I guess I did not read them all carefully enough.
Thanks.

Devin

On Tue, May 3, 2016 at 1:22 PM, Mark Payne <markap14@hotmail.com> wrote:

> Hi Devin,
>
> I think the 'replaceNull' function is what you are looking for. For
> example:
>
> ${ greeting:replaceNull('hello'):length():gt(5) }
>
> You can find the documentation for this function at
> http://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#replacenull
>
> Thanks
> -Mark
>
>
> On May 3, 2016, at 6:27 AM, Devin Fisher <
> devin.fisher@perfectsearchcorp.com> wrote:
>
> I'm looking for the ability similar to the 'getOrDefault'[1] in the Java
> Map class.  I would like to access an attribute if the flow file has it but
> be able to define a default if it don't. I've looked over the doc and can't
> find a way to do it and wanted to see if someone else has done it.
>
> Devin
>
> [1]
> https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#getOrDefault-java.lang.Object-V-
>
>
>

Mime
View raw message