Re: [Dev] Custome Function in siddhi query

2014-10-23 Thread Shashika Karunatilaka
Hi kasun, Thanks for the info.. On Tue, Oct 21, 2014 at 3:24 PM, Kasun De Silva kas...@wso2.com wrote: Hi Shashika, I belieive you have to write a custom OutputAggregator (see : https://docs.wso2.com/display/CEP310/Writing+a+Custom+OutputAttributeAggregator) and use it with length or time

Re: [Dev] Custome Function in siddhi query

2014-10-19 Thread Lahiru Cooray
Hi, I guess Shashika needs to read all the events in a single stream and out put a *single value.* *Stream1 * Event 1 {BookID:'001'} {BookName:'aaa' } Event 2 {BookID:'002'} {BookName:'bbb' } Event 3 {BookID:'003'} {BookName:'ccc' } *Eg: Output the Book Count * As per my understanding we

Re: [Dev] Custome Function in siddhi query

2014-10-19 Thread Awanthika Senarath
Hi Lahiru, Yes, my bad. In that case he has to use a custom window. thanks and regards On Sun, Oct 19, 2014 at 3:21 PM, Lahiru Cooray lahi...@wso2.com wrote: Hi, I guess Shashika needs to read all the events in a single stream and out put a *single value.* *Stream1 * Event 1

Re: [Dev] Custome Function in siddhi query

2014-10-19 Thread Lahiru Cooray
Hi Awanthika, I totally agree with your point when we except result for each event. We can pass a single attribute to a custom function (in multiple events/streams) and store it. We wrote a function to calculate the cardinality (distinct event count in each stream).And there we updated a single

Re: [Dev] Custome Function in siddhi query

2014-10-18 Thread Awanthika Senarath
Hi all, We have implemented a similar scenario for gps stream calculations in a custom function, where we process a single attribute in a stream over a certain period by passing only that attribute to the function. you can send your data to your custom function and keep only the attribute you

Re: [Dev] Custome Function in siddhi query

2014-10-17 Thread Asok Perera
Hi Shashika/Mohan, Just for my knowledge, Wouldn't a custom window keep a set of complete events when only a set of attributes (eg: set of 'bookID's from events) is need to be considered ? So won't this be unnecessary overhead ? If we can create a custom function such that is keeps the BookID

Re: [Dev] Custome Function in siddhi query

2014-10-16 Thread Shashika Karunatilaka
Hi Mohanadarshan, Thanks for the info, yes i have to go with the custom window. On Wed, Oct 15, 2014 at 6:03 PM, Mohanadarshan Vivekanandalingam mo...@wso2.com wrote: On Wed, Oct 15, 2014 at 5:52 PM, Shashika Karunatilaka shashi...@wso2.com wrote: Hi, Hi Shashika, I'm in the

[Dev] Custome Function in siddhi query

2014-10-15 Thread Shashika Karunatilaka
Hi, I'm in the process of creating siddhi custom function, its like an aggregate function which inputs a set of data returns a single value. Is there a way i can send data array to my custom function or else can i handle that inside my custom function? As an example there is a stream called A,

Re: [Dev] Custome Function in siddhi query

2014-10-15 Thread Mohanadarshan Vivekanandalingam
On Wed, Oct 15, 2014 at 5:52 PM, Shashika Karunatilaka shashi...@wso2.com wrote: Hi, Hi Shashika, I'm in the process of creating siddhi custom function, its like an aggregate function which inputs a set of data returns a single value. Is there a way i can send data array to my custom