It's working now. Thanks. On Mon, Jun 22, 2015 at 8:15 PM, Tharik Kanaka <[email protected]> wrote:
> Make that averageLoad float parameter of processed_data export stream as > double and try. > Average function will return a double value. > > On Mon, Jun 22, 2015 at 7:17 PM, Maheshakya Wijewardena < > [email protected]> wrote: > >> Hi, >> >> I'm trying to create an execution plan similar to the following: >> >> >> >> It has a data receiver for an event stream called `streaming_data`, a >> data publisher for a event stream called `processed_data`. >> I have created an execution plan as follows: >> >> /* Enter a unique ExecutionPlan */ >>> @Plan:name('ExecutionPlan') >>> >>> /* Enter a unique description for ExecutionPlan */ >>> -- @Plan:description('ExecutionPlan') >>> >>> /* define streams/tables and write queries here ... */ >>> >>> @Import('streaming_data:1.0.0') >>> define stream streaming_data (meta_type string, id int, timeStamp int, >>> value float, property bool, plugId int, householdId int, houseId string); >>> >>> @Export('processed_data:1.0.0') >>> define stream processed_data (averageLoad float); >>> >>> from streaming_data#window.length(5) >>> select avg(value) as averageLoad >>> insert into processed_data; >>> >> >> When I try to validate my query, I get the following error: >> >>> Different definition same as output stream definition >>> :StreamDefinition{id='processed_data', >>> attributeList=[Attribute{id='averageLoad', type=DOUBLE}], annotations=[]} >>> already exist as:StreamDefinition{id='processed_data', >>> attributeList=[Attribute{id='averageLoad', type=FLOAT}], >>> annotations=[Annotation{name='Export', elements=[Element{key='null', >>> value='processed_data:1.0.0'}]}]} in execution plan "ExecutionPlan" >> >> >> What might be the reason for this? >> >> What I want to do is reading a moving window from the `streaming_data` >> event stream, get the average value of the atribute `value` within that >> window and send that to the `processed_data` event stream. >> >> (I've built from the sources of product-cep master and running CEP in >> distributed mood with Storm) >> >> Best regards. >> -- >> Pruthuvi Maheshakya Wijewardena >> Software Engineer >> WSO2 Lanka (Pvt) Ltd >> Email: [email protected] >> Mobile: +94711228855 >> >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > > *Tharik Kanaka* > > WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka > > Email: [email protected] | Web: www.wso2.com > -- Pruthuvi Maheshakya Wijewardena Software Engineer WSO2 Lanka (Pvt) Ltd Email: [email protected] Mobile: +94711228855
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
