Hi Aneela,

The siddhi query you have specified processes each and every incoming
event. Since processing is done in real time, when the first event for
ts= 2016-05-08
09:00 arrives it gives count = 1 (due to no events with ts = 2016-05-08
09:00 having arrived earlier). When second event with ts = 2016-05-08 09:00
comes, we get count as 2 since an event with same ts arrived earlier as
well.

Best Regards,
Charini

On Wed, Jun 22, 2016 at 4:40 PM, Aneela Safdar <ansaf_...@yahoo.com> wrote:

> Hi all,
>
> I am having a trouble in digesting results of my group by query. My source
> stream named intermediateStream has data
>
>      ts                       uid             id_resp_h
> 2016-05-08 08:59      CLuCgz3HHzG7LpLwH9    172.30.26.119
> 2016-05-08 09:00      C3WnnK3TgUf2cSzxVa    172.30.26.127
> 2016-05-08 09:00      C3WnnK3TgUf2cSzxff    172.30.26.119
>
> SIDDHI query is
>
> from intermediateStream
> select ts, count(ts) as ssh_logins
> group by ts
> insert into SSHOutStream;
>
> I am expecting output to be like
>
>         ts         ssh_logins
> 2016-05-08 08:59       1
> 2016-05-08 09:00       2
>
> But instead it returns
>
>         ts         ssh_logins
> 2016-05-08 08:59       1
> 2016-05-08 09:00       1
> 2016-05-08 09:00       2
>
> Any suggestions?
>
> Regards, Aneela Safdar
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to