Hi David,

In CEP when a defined stream is altered by the user,  existing stream is
removed and  a new stream is created with the altered definition using a
newly initialized SiddhiManager. I was referring to that case in the
previous reply.
But in Siddhi level we don't support altering streams.

As you are working in Siddhi level, as an alternative for your scenario,
you can remove old stream definitions and define a new stream with altered
definition.

Hope this will help.

Thanks


On Thu, Aug 7, 2014 at 3:30 PM, David Morales <[email protected]> wrote:

> Thanks for your quick reply.
>
> In our tests the query with "select *" is not reflecting the changes in
> streams... let me explain our test case again.
>
>
> 1) Create streamA (field1, field2), ok
> 2) select * from streamA insert into streamB, ok
> 3) check that streamB have two fields, ok
> 4) add attribute to streamA, ok
> 5) check that query callback is receiving three fields (*) KO
>
> And also
>
> 1) Create streamA (field1, field2), ok
> 2) select * from streamA insert into streamB, ok
> 3) check that streamB have two fields, ok
> 4) add attribute to streamA, ok
> 5) add the same attribute to streamB, ok
> 6) check that query callback is receiving three fields (*) KO
>
> We can alter the streamA, but the query will remain with only two fields
> (callback on query), and of course streamB will remain with two fields.
>
> Attached you can find a project with the test case.
>
>
>
>
>
>
>
>
>
>
>
> 2014-08-07 9:46 GMT+02:00 Sachini Jayasekara <[email protected]>:
>
> Hi David,
>>
>> Altering a stream definition is supported in CEP.
>>
>> In order to get the correct results you have to modify the output stream
>> definition as well.(in your case streamB)
>> Please make sure that you have modified streamB.
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Aug 6, 2014 at 6:32 PM, David Morales <[email protected]>
>> wrote:
>>
>>> Hi there,
>>>
>>> We are adding new fields to an existing stream, by using
>>> StreamDefinition, something similar to "alter stream" but you can't remove
>>> fields.
>>>
>>> But we have checked that this new field is not reflected in "select *"
>>> queries, and neither in the connected stream.
>>>
>>> So.
>>>
>>> 1) Create streamA (field1, field2)
>>> 2) select * from streamA insert into streamB
>>> 3) add attribute to streamA
>>>
>>> This will alter the streamA, but the query will remain with only two
>>> fields (callback on query), and of course streamB will remain with two
>>> fields.
>>>
>>> Do you think that this is the expected behaviour? do you think that
>>> "alter stream" is a nice feature to have? it will be great to hear your
>>> opinion.
>>>
>>>
>>>
>>> Regards.
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>>
>>
>>
>> *Thanks & Regards,Sachini Jayasekara Software Engineer; **WSO2 Inc. *
>>
>> *lean . enterprise . middleware |  http://wso2.com <http://wso2.com> *
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 



*Thanks & Regards,Sachini JayasekaraSoftware Engineer; **WSO2 Inc. *

*lean . enterprise . middleware |  http://wso2.com <http://wso2.com> *
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to