LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Agg to return zero

    Employee
    Posted 08-19-2014 19:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Patman

    I am using the Agg Node to return the number of records however, it is returning no record if the count is zero. Any known clean workaround on this?


  • 2.  RE: Agg to return zero

    Employee
    Posted 08-19-2014 20:36

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Build a Static Data node with one record in it, and CAT that to your main stream.

    Then in the Agg, you'll get one record out even if there are zero records in the (main) stream.

    In the Agg, you'd use some code like this:

    c=count()
    emit c-1 as Count
    where lastInGroup


  • 3.  RE: Agg to return zero

    Employee
    Posted 08-19-2014 20:57

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Patman

    Thank you!