wso2complex-event-processingsiddhi

Siddhi externalTime window issue


I'm trying to calculate some stats in a sliding window interval

from CsvInputFileStreamWithConvertedTimestamp#window.externalTime(time, 250 milliseconds) 
select time as timeslice, time:dateFormat(time, 'yyyy-MM-dd') as date, time:dateFormat(time, 'HH:mm:ss') as time, instrument, sum(fin) / sum(quantity) as vwap, max(price) * min(price)-1 as prange, max(price) as prangemax, min(price) as prangemin, sum(quantity) as totalquant, avg(quantity) as avgquant, 0 as medquant, sum(fin) as totalfin, avg(fin) as avgfin, count() as trades, distinctCount(buyer) as nofbuy, distinctCount(seller) as nofsell, cast(distinctCount(seller), 'double') / distinctCount(buyer) as bsratio, count(buyer) as buyaggr, count(seller) as sellaggr, sum(quantity) as totalblockquant 
insert expired events into OutputStream;

But in the output most values are null

enter image description here

This is my input data

enter image description here

Any idea what i'm doing wrong here


Solution

  • Solved.

    I was using insert expired events into instead of insert all events into