FYA..

On Thu, Nov 14, 2019 at 6:38 PM A. V. <[email protected]> wrote:

> Hi,Im trying to make windows with a length batch of 100 rows each and to
> use some R functions to calculate some statistical data for each batch. In
> the below code I:
>
>    - * define a inputstream
>    - * I create a query to convert the features into the right datatype
>    - * In the below query I make window batches for 100 rows each and im
>    getting the max and standard deviation value for the "Result" feature. When
>    I run the code below it works for the first 100 rows. As u can see in the
>    output below. But the output below only gives a log of the first batch of
>    100 rows. I want to do this for batch 1-100, 101-200, 201-300 etc. How can
>    I do this? What am I doing wrong?
>
> *[2019-11-13_14-43-11_280] INFO
> {org.wso2.siddhi.core.stream.output.sink.LogSink} - LOGGER :
> Event{timestamp=1573652690107, data=[100, 96.73, 11.004484222861702],
> isExpired=false}*
>
> *define stream HBA1CStream(measurementID String, dateTime String, result
> String, unixDateTime String);**@sink(type='log', prefix='LOGGER')**define
> stream OutputStream(measurementID int, maxValue double, sdValue 
> double);**@info(name
> = 'Query')**from HBA1CStream**select convert(measurementID, 'int') as
> measurementID, convert(str:replaceAll(result,',','.'), 'double') as result,
> dateTime, convert(unixDateTime, 'long') as unixDateTime**insert into
> RStream;**@info(name = 'RStream')**from
> RStream#window.lengthBatch(100)#r:eval("c <- max(result); m <-
> sd(result);", "c double, m double ", result, result)**select
> measurementID, c as maxValue , m as sdValue**insert into OutputStream;*
>
> Thanks for the help.
>
> Best regards,
> Wiedo
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*V. Mohanadarshan* | Senior Technical Lead | WSO2 Inc.
<http://www.wso2.com/> |
(M) 94-771117673 | (E) [email protected] |
GET INTEGRATION AGILE
Integration Agility for Digitally Driven Business
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to