سؤال

Below is our Esper EPL statement:

insert rstream into SelectedFieldsStream
            select rstream feedId as feedId
            , data.inputEvents.inputEventCount as inputCounts 
            , data.inputEvents.inputEvent[1].name as inputName
            , data.inputEvents.inputEvent[1].count as inputCount
from AStream

Wondering how can I iterate through all the array elements (where 'inputCounts' above gives array size) in the query above as opposed to just getting one array value like in above EPL.

Any help on this will be greatly appreciated!!

Sunit.

هل كانت مفيدة؟

المحلول

Esper provide enumeration methods aka. lambda/closure i.e. "select data.input.inputEvents.countOf() ..." Or you could write a custom UDF or script if custom logic is needed.

Best regards, Tom

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top