Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top