Hi all,

I'm writing an application with Siddhi 3.0.0 alpha and I'm having some
issues with it.

I'm using the documentation from the beta 4.0.0 of CEP [1] and I've found
some differences with this version of Siddhi that i'm using, so I wish you
guys can help me out with the following questions:

1) CEP 4.0.0 is not using Siddhi 3.0.0, Am I right? When is the final
version of Siddhi 3.0.0 going to release? Will it have any documentation?
I'm particulary interested in changes on the query language and the new
annotations.

2) There are some differences between the siddhi language model at [2] and
the examples at [3]. Specifically on the output type on the insert
statement. [2] says that you can specify the output type like this:
<output-type> ::= expired-events | current-events | all-events
<output> ::= ((insert [<output-type>] into <stream-name>) | (return
[<output-type>]))

But the examples at [3] specifies the output type like this:
[...] insert into StockQuote for expired-events 

However, when I try to write a query with any of these two options, I get a
SiddhiParserException.
I suppose the documentation is outdated. Does the new version of Siddhi does
this in a different way?

3) I'm also trying to do the following: For a given stream, which have two
fields: name (string) and count (integer), every 5 minutes write to
outputStream the sum of counts for every name. Is that possible?
I tried to write a query like this to achieve that: 

@config(async = 'true') define stream rawStream (name string, count int)
from rawStream#window.timeBatch(5 min) select name, sum(count) as sumCount
group by name insert into outputStream

While it is valid, this execution plan emits the sum of the name for every
event that arrived in those 5 minutes. That means that the same string
appears more than one time. I would like to get only one name with its
associated sum of "count". Is that possible?

Thank you!

[1] 
https://docs.wso2.com/display/CEP400/WSO2+Complex+Event+Processor+Documentation
<https://docs.wso2.com/display/CEP400/WSO2+Complex+Event+Processor+Documentation>
  
[2]  https://docs.wso2.com/display/CEP400/Language+Model
<https://docs.wso2.com/display/CEP400/Language+Model>  
[3]  https://docs.wso2.com/display/CEP400/Windows
<https://docs.wso2.com/display/CEP400/Windows>  



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/Insert-into-and-groups-by-on-Siddhi-3-0-0-alpha-tp121286.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to