문제

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