Paul, I refer you to the documentation for count[1], which states: "Aggregate function that counts the number of non-null, non-false values returned"
[1] https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#count On Tue, Aug 23, 2016 at 2:37 PM Paul Nahay <[email protected]> wrote: > Thanks. > > However, your documentation is lacking, because in your documentation for > "allDelineatedValues", there is nothing that explains how ":count()" can be > applied to: > *Return Type*: Boolean > meaning, how ":count()" can be applied to each boolean separately to > produce a "4". > > Yes, I understand what it's doing, but your documentation doesn't explain > what it needs to. If this is true: > > *Return Type*: Boolean > > then your table with examples with "Value" in the right-hand column should > have only booleans, not the integer 4 in it. > > Paul > > -----Original Message----- > From: Jeff > Sent: Aug 23, 2016 1:00 PM > To: Paul Nahay , "[email protected]" > Subject: Re: Can't Chain "count()" with "plus()" > > 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 <[email protected]> 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) >> [email protected] >> > > Paul Nahay > 1013 Rosemere Ave. > Silver Spring, MD 20904-3008 > 301-680-3825 (home) > 301-806-9265 (cell)[email protected] > > > >
