nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff <jtsw...@gmail.com>
Subject Re: Can't Chain "count()" with "plus()"
Date Tue, 23 Aug 2016 17:00:03 GMT
Hello Paul,

The documentation for allDelineatedValues[1] states that each of the
resulting values are evaluated against the rest of the Expression.  You
need to use an embedded expression, since you don't want the plus function
to be evaluated against each split from allDelineatedValues.  Try this
slightly more complex expression:

${literal(${allDelineatedValues("aaa,bbb,ccc",","):count()}):plus(1)}

[1]
https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#alldelineatedvalues

On Tue, Aug 23, 2016 at 12:21 PM Paul Nahay <pnahay@sprynet.com> wrote:

> The following NiFi Expression Language construct gives me an error, and I
> don't understand why:
>
> ${allDelineatedValues("aaa,bbb,ccc",","):count():plus(1)}
>
> It's fine without the ":plus(1)", but fails with it, with this error:
>
> AttributeExpressionLanguageException:
> Cannot evaluate Expression because it attempts to reference multiple
> attributes but does not use a reducing function
>
> (I am typing the error message above)
>
> It would seem like I should be able to add 1 to a count.
>
> It's NiFi version 0.6.1.c
>
>
> Paul Nahay
> 1013 Rosemere Ave.
> Silver Spring, MD 20904-3008
> 301-680-3825 (home)
> 301-806-9265 (cell)
> pnahay@sprynet.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message