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 instance for multiple streams.



On Sun, Oct 19, 2014 at 4:31 PM, Awanthika Senarath <[email protected]>
wrote:

> 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 <[email protected]> wrote:
>
>> 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 cannot use a custom function for this use case
>> since it will output a result for each event.
>>
>> On Thu, Oct 16, 2014 at 6:42 PM, Shashika Karunatilaka <
>> [email protected]> wrote:
>>
>>> 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 <
>>> [email protected]> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Oct 15, 2014 at 5:52 PM, Shashika Karunatilaka <
>>>> [email protected]> 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 function or else
>>>>> can i handle that inside my custom function?
>>>>> As an example there is a stream called "A", stream "A" has attribute
>>>>> called "bookID", i need to pass all the bookID's in that stream to the
>>>>> aggregate function and return a single value.
>>>>>
>>>>>
>>>> Based on my understanding, i don't believe siddhi function is
>>>> appropriate for your usecase.. You may need to use transform processor or
>>>> window..
>>>>
>>>> Thanks,
>>>> Mohan
>>>>
>>>>
>>>>
>>>>> Thank you.
>>>>>
>>>>> --
>>>>> Shashika Prabath Karunatilaka,
>>>>> Software Engineer,
>>>>> WSO2, Inc: http://wso2.com/
>>>>> mobile : +94 77 7487792
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *V. Mohanadarshan*
>>>> *Software Engineer,*
>>>> *Data Technologies Team,*
>>>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>>>> *lean.enterprise.middleware.*
>>>>
>>>> email: [email protected]
>>>> phone:(+94) 771117673
>>>>
>>>
>>>
>>>
>>> --
>>> Shashika Prabath Karunatilaka,
>>> Software Engineer,
>>> WSO2, Inc: http://wso2.com/
>>> mobile : +94 77 7487792
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Lahiru Cooray*
>> Software Engineer
>> WSO2, Inc.;http://wso2.com/
>> lean.enterprise.middleware
>>
>> Mobile: +94 715 654154
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Awanthika Senarath
> Software Engineer, WSO2 Inc.
> Mobile: +94717681791
>
>
>


-- 
*Lahiru Cooray*
Software Engineer
WSO2, Inc.;http://wso2.com/
lean.enterprise.middleware

Mobile: +94 715 654154
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to