Вопрос

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