Re: [Dev] WSO2 SP Aggregation problem

2018-01-13 Thread Charini Nanayakkara
Hi Juan,

Just to keep you informed that any issues we get to know about in future,
would be fixed through our update process (https://wso2.com/updates/wum)

Thank you
Charini

On Sat, Jan 13, 2018 at 8:26 AM, Charini Nanayakkara <chari...@wso2.com>
wrote:

> Hi Juan,
>
> Thank you very much for pointing this out.
>
> I have mentioned the concern regarding table name length in the
> documentation [1]
>
> [1] https://docs.wso2.com/display/SP400/Incremental+Analysis
>
> Best Regards
> Charini
>
> On Fri, Jan 12, 2018 at 9:35 PM, Juan Pablo Vadell <jpvad...@vatrox.com>
> wrote:
>
>> Hi Charini,
>>
>> I tried the release version of WSO2 SP 4.0 and works great with Oracle DB
>> now with the add of AGG_ before the column name.
>>
>> One thing that maybe you must add/change in the docs, is the that Oracle
>> table name size that I pointed out before.
>>
>> Your example Tutorial 6: Streaming Data Summarization (Incremental
>> Aggregation)
>> <https://docs.wso2.com/pages/viewpage.action?pageId=80721826> has the
>> name *SweetProductionAggregation *and this not work with Oracle because,
>> for example, the name SweetProductionAggregation_SECONDS has 34 of
>> length, and the limit is 30.
>>
>> Thank you for correct the problem of aggregation with Oracle DB, because
>> we are doing some POCs and our clients has mainly Oracle.
>>
>> Juan Pablo Vadell | *VATROX*
>>
>>
>> On Tue, Jan 9, 2018 at 1:52 AM, Charini Nanayakkara <chari...@wso2.com>
>> wrote:
>>
>>> Hi Juan,
>>>
>>> Thanks again for reporting this issue. We will look into it.
>>>
>>> Best Regards
>>> Charini
>>>
>>> On Tue, Jan 9, 2018 at 10:18 AM, Juan Pablo Vadell <jpvad...@vatrox.com>
>>> wrote:
>>>
>>>> Hi Charini,
>>>>
>>>> You must take care of Oracle table names Max Length, that is 30 until
>>>> 12.1 and 128 bytes from 12.2.
>>>>
>>>> I created an issue at github before you, but in the wrong place.
>>>> https://github.com/wso2/siddhi/issues/717
>>>>
>>>> Thank you,
>>>>
>>>> Juan Pablo Vadell | *VATROX*
>>>>
>>>> On Tue, Jan 9, 2018 at 12:35 AM, Charini Nanayakkara <chari...@wso2.com
>>>> > wrote:
>>>>
>>>>> Hi Juan,
>>>>>
>>>>> Thank you for reporting this issue.
>>>>>
>>>>> SP aggregation has only been tested with MySql so far. We have updated
>>>>> that information in SP documentation [1]
>>>>>
>>>>> As explained by you, the reported issue arises in Oracle, due to not
>>>>> specifying attributes starting with underscore (such as _TIMESTAMP) within
>>>>> quotation marks. We have created an issue in github for this [2]. We will
>>>>> work on fixing it.
>>>>>
>>>>> [1] https://docs.wso2.com/display/SP400/Incremental+Analysis
>>>>> [2] https://github.com/wso2-extensions/siddhi-store-rdbms/issues/72
>>>>>
>>>>> Thank you
>>>>> Charini
>>>>>
>>>>> On Sun, Jan 7, 2018 at 10:01 AM, Juan Pablo Vadell <
>>>>> jpvad...@vatrox.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to test the Siddhi Aggregation feature and found that
>>>>>> don't work with Oracle DB.
>>>>>>
>>>>>> The error I think is because you are trying to use _TIMESTAMP as
>>>>>> column name, and with Oracle you need to use double quotes at the column
>>>>>> name like "_TIMESTAMP", if not you will receive a
>>>>>>
>>>>>> *ORA-00911: invalid character*
>>>>>>
>>>>>> This is the complete error
>>>>>>
>>>>>>
>>>>>>
>>>>>> *[2018-01-07_01-13-51_009] ERROR {org.wso2.siddhi.core.table.Table} -
>>>>>> Error on 'AggProductionHistoryApp'. Failed to initialize store for table
>>>>>> name 'SweetProdAgg_MONTHS': Unable to initialize table
>>>>>> 'SweetProdAgg_MONTHS': ORA-00911: invalid character_ Error while 
>>>>>> connecting
>>>>>> to Table 'SweetProdAgg_MONTHS', will retry in '5 sec'.
>>>>>> (Encoded)org.wso2.siddhi.core.exception.ConnectionUnavailableException:
>>>>>> Failed to in

Re: [Dev] WSO2 SP Aggregation problem

2018-01-12 Thread Charini Nanayakkara
Hi Juan,

Thank you very much for pointing this out.

I have mentioned the concern regarding table name length in the
documentation [1]

[1] https://docs.wso2.com/display/SP400/Incremental+Analysis

Best Regards
Charini

On Fri, Jan 12, 2018 at 9:35 PM, Juan Pablo Vadell <jpvad...@vatrox.com>
wrote:

> Hi Charini,
>
> I tried the release version of WSO2 SP 4.0 and works great with Oracle DB
> now with the add of AGG_ before the column name.
>
> One thing that maybe you must add/change in the docs, is the that Oracle
> table name size that I pointed out before.
>
> Your example Tutorial 6: Streaming Data Summarization (Incremental
> Aggregation) <https://docs.wso2.com/pages/viewpage.action?pageId=80721826> has
> the name *SweetProductionAggregation *and this not work with Oracle
> because, for example, the name SweetProductionAggregation_SECONDS has 34
> of length, and the limit is 30.
>
> Thank you for correct the problem of aggregation with Oracle DB, because
> we are doing some POCs and our clients has mainly Oracle.
>
> Juan Pablo Vadell | *VATROX*
>
>
> On Tue, Jan 9, 2018 at 1:52 AM, Charini Nanayakkara <chari...@wso2.com>
> wrote:
>
>> Hi Juan,
>>
>> Thanks again for reporting this issue. We will look into it.
>>
>> Best Regards
>> Charini
>>
>> On Tue, Jan 9, 2018 at 10:18 AM, Juan Pablo Vadell <jpvad...@vatrox.com>
>> wrote:
>>
>>> Hi Charini,
>>>
>>> You must take care of Oracle table names Max Length, that is 30 until
>>> 12.1 and 128 bytes from 12.2.
>>>
>>> I created an issue at github before you, but in the wrong place.
>>> https://github.com/wso2/siddhi/issues/717
>>>
>>> Thank you,
>>>
>>> Juan Pablo Vadell | *VATROX*
>>>
>>> On Tue, Jan 9, 2018 at 12:35 AM, Charini Nanayakkara <chari...@wso2.com>
>>> wrote:
>>>
>>>> Hi Juan,
>>>>
>>>> Thank you for reporting this issue.
>>>>
>>>> SP aggregation has only been tested with MySql so far. We have updated
>>>> that information in SP documentation [1]
>>>>
>>>> As explained by you, the reported issue arises in Oracle, due to not
>>>> specifying attributes starting with underscore (such as _TIMESTAMP) within
>>>> quotation marks. We have created an issue in github for this [2]. We will
>>>> work on fixing it.
>>>>
>>>> [1] https://docs.wso2.com/display/SP400/Incremental+Analysis
>>>> [2] https://github.com/wso2-extensions/siddhi-store-rdbms/issues/72
>>>>
>>>> Thank you
>>>> Charini
>>>>
>>>> On Sun, Jan 7, 2018 at 10:01 AM, Juan Pablo Vadell <jpvad...@vatrox.com
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to test the Siddhi Aggregation feature and found that
>>>>> don't work with Oracle DB.
>>>>>
>>>>> The error I think is because you are trying to use _TIMESTAMP as
>>>>> column name, and with Oracle you need to use double quotes at the column
>>>>> name like "_TIMESTAMP", if not you will receive a
>>>>>
>>>>> *ORA-00911: invalid character*
>>>>>
>>>>> This is the complete error
>>>>>
>>>>>
>>>>>
>>>>> *[2018-01-07_01-13-51_009] ERROR {org.wso2.siddhi.core.table.Table} -
>>>>> Error on 'AggProductionHistoryApp'. Failed to initialize store for table
>>>>> name 'SweetProdAgg_MONTHS': Unable to initialize table
>>>>> 'SweetProdAgg_MONTHS': ORA-00911: invalid character_ Error while 
>>>>> connecting
>>>>> to Table 'SweetProdAgg_MONTHS', will retry in '5 sec'.
>>>>> (Encoded)org.wso2.siddhi.core.exception.ConnectionUnavailableException:
>>>>> Failed to initialize store for table name 'SweetProdAgg_MONTHS': Unable to
>>>>> initialize table 'SweetProdAgg_MONTHS': ORA-00911: invalid character*
>>>>>
>>>>> And other thing is that Oracle don't support long table names... so we
>>>>> must take care of that.
>>>>>
>>>>> Thank you,
>>>>>
>>>>> Juan Pablo Vadell | *VATROX*
>>>>>
>>>>>
>>>>> ___
>>>>> Dev mailing list
>>>>> Dev@wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Charini Vimansha Nanayakkara*
>>>> Software Engineer at WSO2
>>>>
>>>> Mobile: 0714126293
>>>> E-mail: chari...@wso2.com
>>>> Blog: http://www.charini.me/
>>>>
>>>> <http://wso2.com/signature>
>>>>
>>>
>>>
>>
>>
>> --
>> *Charini Vimansha Nanayakkara*
>> Software Engineer at WSO2
>>
>> Mobile: 0714126293
>> E-mail: chari...@wso2.com
>> Blog: http://www.charini.me/
>>
>> <http://wso2.com/signature>
>>
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/

<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 SP Aggregation problem

2018-01-08 Thread Charini Nanayakkara
Hi Juan,

Thanks again for reporting this issue. We will look into it.

Best Regards
Charini

On Tue, Jan 9, 2018 at 10:18 AM, Juan Pablo Vadell <jpvad...@vatrox.com>
wrote:

> Hi Charini,
>
> You must take care of Oracle table names Max Length, that is 30 until 12.1
> and 128 bytes from 12.2.
>
> I created an issue at github before you, but in the wrong place.
> https://github.com/wso2/siddhi/issues/717
>
> Thank you,
>
> Juan Pablo Vadell | *VATROX*
>
> On Tue, Jan 9, 2018 at 12:35 AM, Charini Nanayakkara <chari...@wso2.com>
> wrote:
>
>> Hi Juan,
>>
>> Thank you for reporting this issue.
>>
>> SP aggregation has only been tested with MySql so far. We have updated
>> that information in SP documentation [1]
>>
>> As explained by you, the reported issue arises in Oracle, due to not
>> specifying attributes starting with underscore (such as _TIMESTAMP) within
>> quotation marks. We have created an issue in github for this [2]. We will
>> work on fixing it.
>>
>> [1] https://docs.wso2.com/display/SP400/Incremental+Analysis
>> [2] https://github.com/wso2-extensions/siddhi-store-rdbms/issues/72
>>
>> Thank you
>> Charini
>>
>> On Sun, Jan 7, 2018 at 10:01 AM, Juan Pablo Vadell <jpvad...@vatrox.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to test the Siddhi Aggregation feature and found that don't
>>> work with Oracle DB.
>>>
>>> The error I think is because you are trying to use _TIMESTAMP as column
>>> name, and with Oracle you need to use double quotes at the column name like
>>> "_TIMESTAMP", if not you will receive a
>>>
>>> *ORA-00911: invalid character*
>>>
>>> This is the complete error
>>>
>>>
>>>
>>> *[2018-01-07_01-13-51_009] ERROR {org.wso2.siddhi.core.table.Table} -
>>> Error on 'AggProductionHistoryApp'. Failed to initialize store for table
>>> name 'SweetProdAgg_MONTHS': Unable to initialize table
>>> 'SweetProdAgg_MONTHS': ORA-00911: invalid character_ Error while connecting
>>> to Table 'SweetProdAgg_MONTHS', will retry in '5 sec'.
>>> (Encoded)org.wso2.siddhi.core.exception.ConnectionUnavailableException:
>>> Failed to initialize store for table name 'SweetProdAgg_MONTHS': Unable to
>>> initialize table 'SweetProdAgg_MONTHS': ORA-00911: invalid character*
>>>
>>> And other thing is that Oracle don't support long table names... so we
>>> must take care of that.
>>>
>>> Thank you,
>>>
>>> Juan Pablo Vadell | *VATROX*
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Charini Vimansha Nanayakkara*
>> Software Engineer at WSO2
>>
>> Mobile: 0714126293
>> E-mail: chari...@wso2.com
>> Blog: http://www.charini.me/
>>
>> <http://wso2.com/signature>
>>
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/

<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 SP Aggregation problem

2018-01-08 Thread Charini Nanayakkara
Hi Juan,

Thank you for reporting this issue.

SP aggregation has only been tested with MySql so far. We have updated that
information in SP documentation [1]

As explained by you, the reported issue arises in Oracle, due to not
specifying attributes starting with underscore (such as _TIMESTAMP) within
quotation marks. We have created an issue in github for this [2]. We will
work on fixing it.

[1] https://docs.wso2.com/display/SP400/Incremental+Analysis
[2] https://github.com/wso2-extensions/siddhi-store-rdbms/issues/72

Thank you
Charini

On Sun, Jan 7, 2018 at 10:01 AM, Juan Pablo Vadell 
wrote:

> Hi,
>
> I am trying to test the Siddhi Aggregation feature and found that don't
> work with Oracle DB.
>
> The error I think is because you are trying to use _TIMESTAMP as column
> name, and with Oracle you need to use double quotes at the column name like
> "_TIMESTAMP", if not you will receive a
>
> *ORA-00911: invalid character*
>
> This is the complete error
>
>
>
> *[2018-01-07_01-13-51_009] ERROR {org.wso2.siddhi.core.table.Table} -
> Error on 'AggProductionHistoryApp'. Failed to initialize store for table
> name 'SweetProdAgg_MONTHS': Unable to initialize table
> 'SweetProdAgg_MONTHS': ORA-00911: invalid character_ Error while connecting
> to Table 'SweetProdAgg_MONTHS', will retry in '5 sec'.
> (Encoded)org.wso2.siddhi.core.exception.ConnectionUnavailableException:
> Failed to initialize store for table name 'SweetProdAgg_MONTHS': Unable to
> initialize table 'SweetProdAgg_MONTHS': ORA-00911: invalid character*
>
> And other thing is that Oracle don't support long table names... so we
> must take care of that.
>
> Thank you,
>
> Juan Pablo Vadell | *VATROX*
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [SP]Incremental processing not working with SP + RDBMS

2017-11-02 Thread Charini Nanayakkara
Hi Gokul,

It worked when I tested without the retrieval part of incremental processor
if I remember correctly.

To be more precise, there are two parts in incremental aggregation. The
part where we aggregate, and the part where we retrieve.

RDBMS store is used in the aggregation level. We refer to that table and
perform a join to retrieve aggregated values in the second phase.

The issue occurs due to a function 'within'  (which has the namespace
'incrementalAggregator') being used in the retrieval part of the query. The
retrieval implementation was not done at the time I tested with RDBMS.
Hence I seem to have overlooked this issue. It should still work when only
the aggregation part is defined in the siddhi application. I will further
verify this matter and update you. Will check how we can fix this.

Thank you
Charini

On Thu, Nov 2, 2017 at 11:45 AM, Gokul Balakrishnan <go...@wso2.com> wrote:

> Hi Charini,
>
> Are you sure that this worked with the RDBMS store before? It has not
> supported function namespaces from the start.
>
> Thanks,
>
> On 2 November 2017 at 11:40, Charini Nanayakkara <chari...@wso2.com>
> wrote:
>
>> Hi Suho,
>>
>> Incremental processing is not working with RDBMS due to a new change
>> introduced at RDBMS extension level which rejects function namespaces. I
>> will discuss this with Gokul as well and find a solution.
>>
>> Thank you
>> Charini
>>
>> On Thu, Nov 2, 2017 at 3:10 AM, Sriskandarajah Suhothayan <s...@wso2.com>
>> wrote:
>>
>>>
>>> Hi Charini
>>>
>>> Please look into this.
>>>
>>> The attached Siddhi file is not compiling with RDBMS Aggregation.
>>>
>>> Thanks
>>> Suho
>>>
>>> --
>>>
>>> *S. Suhothayan*
>>> Associate Director / Architect
>>> *WSO2 Inc. *http://wso2.com
>>> * <http://wso2.com/>*
>>> lean . enterprise . middleware
>>>
>>>
>>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>>> http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter:
>>> http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in:
>>> http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
>>>
>>
>>
>>
>> --
>> *Charini Vimansha Nanayakkara*
>> Software Engineer at WSO2
>>
>> Mobile: 0714126293
>> E-mail: chari...@wso2.com
>> Blog: http://www.charini.me/
>>
>> <http://wso2.com/signature>
>>
>
>
>
> --
> Gokul Balakrishnan
> Senior Software Engineer,
> WSO2, Inc. http://wso2.com
> M +94 77 5935 789 | +44 7563 570502 <+44%207563%20570502>
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/

<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [SP]Incremental processing not working with SP + RDBMS

2017-11-02 Thread Charini Nanayakkara
Hi Suho,

Incremental processing is not working with RDBMS due to a new change
introduced at RDBMS extension level which rejects function namespaces. I
will discuss this with Gokul as well and find a solution.

Thank you
Charini

On Thu, Nov 2, 2017 at 3:10 AM, Sriskandarajah Suhothayan 
wrote:

>
> Hi Charini
>
> Please look into this.
>
> The attached Siddhi file is not compiling with RDBMS Aggregation.
>
> Thanks
> Suho
>
> --
>
> *S. Suhothayan*
> Associate Director / Architect
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
> http://suhothayan.blogspot.com/ twitter:
> http://twitter.com/suhothayan  | linked-in:
> http://lk.linkedin.com/in/suhothayan *
>



-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB Broker Re-Connection in case of Broker Failure

2017-09-17 Thread Charini Nanayakkara
Hi Junior,

I tried this scenario with a topic subscription but couldn't reproduce the
issue. The exact same jndi properties were used whereas the axis
configurations were same except for the fact that I tried with a topic. Not
sure whether it's specific to queues. Will test that scenario and update
you.

Thank you
Charini

On Fri, Sep 15, 2017 at 5:14 PM, Júnior  wrote:

> Hi,
>
>  I am trying to setup a connection to the WSO2 MB from the WSO2 ESB, in a
> way that in case of a Broker failure or shutdown, ESB be able to handle
> that and reconnect to it once Broker is up and running.
>
> I have this setup in axis2.xml:
>
> 
>  locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>  locked="false">conf/jndi.properties
>  locked="false">QueueConnectionFactory
>  locked="false">queue
>  locked="false">20
>  locked="false">20
>  locked="false">30
> 
>
> And in jndi.properties I have this settings for broker failover:
>
> connectionfactory.QueueConnectionFactory=amqp://admin:admin@carbon/carbon?failover='roundrobin'='2'='tcp://brk1:5675?retries='5'='50';tcp://brk2:5675?retries='5'='50''
>
> I noticed that when, we shutdown only one of the instances it handles the
> failover defined in jndi.properties, but when we shutdown both brokers and
> restart them, the proxy services that are pooling messages from the queues
> do not process any message, like the connection with the Broker were not ok.
>
> Is there any specific parameter that we need to add on axis2.xml or
> jndi.properties that could helps to achieve this requirement?
>
> Thanks in advance,
>
> https://stackoverflow.com/questions/46238761/wso2-esb-
> broker-re-connection-in-case-of-broker-failure
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Siddhi CEP

2017-09-10 Thread Charini Nanayakkara
Hi Hasara,

You can use any IDE such as Intellij, Eclipse, etc. No such plugins are
needed to build the source code. Just checkout the code and play around
with the test cases to get a basic idea.

Best Regards
Charini



On Sun, Sep 10, 2017 at 9:18 PM, Hasara Maithree <
hasaramaithreedesi...@gmail.com> wrote:

> Hi,
>
> After having a look at the documentation of siddhi and creating a sample
> app as described in the quick start guide, I thought of going through the
> siddhi source code. I downloaded v4.0.0-M62 zip file from
> https://github.com/wso2/siddhi/releases/tag/v4.0.0-M62 . Which IDE should
> I use in order to run the source code ? If I use IDE like Intellij do I
> have to add plugins for siddhi? Please clarify this matter.
>
> Thank you.
>
> On Wed, Sep 6, 2017 at 12:33 AM, Damith Wickramasinghe 
> wrote:
>
>> Hi Hasara,
>>
>> Documentation is still in working progress. It need to be re-factored.
>> In Editor mode the default saving location is the workspace folder thus not
>> letting you to select a location to be saved . Also in Editor mode you can
>> create any siddhi app and try it out using our event simulator , debugger
>> which are inbuilt in the editor. Once you tested your siddhi app you can
>> copy it to siddhi-files folder and start the SP in worker mode.(worker.sh)
>> and try to publish events according to source you have defined. The error
>> you have mentioned in the editor should not be appearing. We will look into
>> it.
>>
>> Regards,
>> Damith
>>
>>
>> On Wed, Sep 6, 2017 at 12:00 AM, Hasara Maithree <
>> hasaramaithreedesi...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> In documentation of quick start guide, it is mentioned that
>>> SmartHomePlan.siddhi should be saved in /deployment/siddhi
>>> -files.But by default, it is saved in /deployment/workspace.So
>>> the final result of the query ends with error. But when I pasted it in
>>> siddhi-files folder, it works fine. I think there is an issue with the
>>> saving location because, in SP there is no option to select location to
>>> save, but by default it is saved to workspace.
>>>
>>>
>>> ​
>>>
>>>
>>>
>>> Thank you
>>>
>>>
>>>
>>> On Tue, Sep 5, 2017 at 10:55 PM, Hasara Maithree <
>>> hasaramaithreedesi...@gmail.com> wrote:
>>>
 Hi,

 I got it.

 Thank you.

 On Tue, Sep 5, 2017 at 10:32 PM, Minudika Malshan 
 wrote:

> Hi,
>
> Sorry. A little correction. 4.0.0-M10 is the latest release [1]
> [1] https://github.com/wso2/product-sp/releases/tag/v4.0.0-M10
>
> BR
>
>
>
> On Tue, Sep 5, 2017 at 10:28 PM, Minudika Malshan 
> wrote:
>
>> Hi Hasara,
>>
>> Only milestone versions of *WSO2 Stream Processor *have been
>> released yet. And yes, 4.0.0-M9 is the latest one.
>> Note that the capabilities of WSO2 CEP and DAS are now provided
>> thorugh WSO2 Stream Processor.
>>
>> BR
>>
>> On Tue, Sep 5, 2017 at 10:15 PM, Hasara Maithree <
>> hasaramaithreedesi...@gmail.com> wrote:
>>
>>> Hi Minudika,
>>>
>>> I think I figured out my problem. I downloaded the wso2 SP 4.0.0-M9
>>> from the link https://github.com/wso2/product-sp
>>> /releases/download/v4.0.0-M9/wso2sp-4.0.0-M9.zip .
>>> I assume this is the latest stable version of wso2 SP. I will try
>>> creating simple siddhi apps in order to familiarize with the
>>> environment.
>>>
>>> Thank you
>>>
>>> On Tue, Sep 5, 2017 at 9:23 PM, Hasara Maithree <
>>> hasaramaithreedesi...@gmail.com> wrote:
>>>
 Hi Minudika,

 Thank you very much for your reply. I have a small thing to
 clarify. Is WSO2 stream processor referred as WSO2 CEP (Complex Event
 Processor) or are they different?
 When I went through the product list, I couldn't find WSO2 SP. And
 the link given by you [2] led me to downlowad WSO2 data analytics 
 server.
 Can you please sort out this confusion ?

 Thank you

 On Mon, Sep 4, 2017 at 7:14 PM, Hasara Maithree <
 hasaramaithreedesi...@gmail.com> wrote:

> Hi Minudika,
> Thank you very much for your reply. I have a small thing to
> clarify. Is WSO2 stream processor referred as WSO2 CEP (Complex Event
> Processor) or are they different?
> When I went through the product list, I couldn't find WSO2 SP. And
> the link given by you [2] led me to downlowad WSO2 data analytics 
> server.
> Can you please sort out this confusion ?
> Thank you
>
> On Mon, Sep 4, 2017 at 11:57 AM, Minudika Malshan <
> minud...@wso2.com> wrote:
>
>> Hi Hasara,
>>
>> It's nice to hear about your interest on Siddhi.
>>
>> As the first step, go through the Siddhi guide[1].
>> Then try to create and run 

Re: [Dev] About the Siddhi expression

2017-09-09 Thread Charini Nanayakkara
Hi,

Sorry for the delayed response.

As per the existing implementation, we cannot achieve your requirement with
sort window due to two reasons.
1) We cannot alter the value of an event which has already been consumed by
a stream. Therefore, we can't change the value of event (id: 3, score: 30)
to (id: 3, score: 5) later. When you send another event as (id: 3, score:
5) it would be considered as a new event. Hence, it doesn't replace (id: 3,
score: 30)
2) The sort window mandates specifying a window length. Therefore we can't
retain the events forever as necessitated to achieve your requirement.


Therefore, if you need to perform sorting by considering all the events,
you would have to write a new extension,
The syntax could be similar to the existing sort window. However,
internally, you would have to maintain a hash map of values, so that for
the incoming events, you can update the map based on the value for the ID
(whatever the attribute(s) you use for indexing). And sorting would have to
be performed on the values in that map


 Thank you
Charini

-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] About the Siddhi expression

2017-09-02 Thread Charini Nanayakkara
Hi,

Just to clarify your requirement.

Do you want to get the topK (highest frequency values) [1] and then sort
the result [2] in ascending or descending order?


[1]
https://docs.wso2.com/display/SIDDHIEXTENSIONS/Extrema+Extension#ExtremaExtension-topK
[2]
https://docs.wso2.com/display/CEP420/Inbuilt+Windows#InbuiltWindows-sortsort

Thank you
Charini

On Thu, Aug 31, 2017 at 7:25 AM, 정형근  wrote:

> I have a question about siddhi query.
>
> Is there a way to sort the Top-k elements with a Siddhi query?
>
> I know about the sort window.
> I also know that this window only holds elements as large as the window
> size.
> That is, once the window size is exceeded, the elements are deleted.
> I think this is unfair because the value of data can be updated.
>
> So what I want to do is recalculate the top k rankings for every incoming
> data.
> Do you have a good idea?
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [C5] Obtaining hostname in carbon kernel 5

2017-01-26 Thread Charini Nanayakkara
Hi Kishanthan

Thank you! Will further discuss the matter with the team

Regards
Charini

On Thu, Jan 26, 2017 at 6:30 PM, Kishanthan Thangarajah <kishant...@wso2.com
> wrote:

> Providing hostname information is part of the transport framework. That is
> why it is not provided from the kernel in C5. We have to see how to expose
> these kind of information from the relevant transport implementation level.
>
> On Thu, Jan 26, 2017 at 5:10 PM, Charini Nanayakkara <chari...@wso2.com>
> wrote:
>
>> Hi,
>>
>> We are in the process of moving carbon analytics common to C5. When
>> migrating, it was noted that C5 disallows us to obtain the hostname (or the
>> server url) unlike in C4. Since the hostname is required in many instances,
>> is it going to be supported in a latter version of C5? Or is there an
>> alternative way of obtaining the server hostname?
>>
>> Thank you
>> Charini
>> --
>> *Charini Vimansha Nanayakkara*
>> Software Engineer at WSO2
>>
>> Mobile: 0714126293
>> E-mail: chari...@wso2.com
>> Blog: http://www.charini.me/
>>
>> <http://wso2.com/signature>
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635 <+94%2077%20342%206635>
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/

<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [C5] Obtaining hostname in carbon kernel 5

2017-01-26 Thread Charini Nanayakkara
Hi,

We are in the process of moving carbon analytics common to C5. When
migrating, it was noted that C5 disallows us to obtain the hostname (or the
server url) unlike in C4. Since the hostname is required in many instances,
is it going to be supported in a latter version of C5? Or is there an
alternative way of obtaining the server hostname?

Thank you
Charini
-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Committers += Malintha Fernando

2016-11-08 Thread Charini Nanayakkara
Congratz Malintha!!! :)

On Tue, Nov 8, 2016 at 8:29 PM, Menaka Jayawardena  wrote:

> Congratz Malintha.!
>
> On Tue, Nov 8, 2016 at 2:46 PM, Irunika Weeraratne 
> wrote:
>
>> Congratulations Malintha!!!
>>
>> Best Regards,
>> Irunika
>>
>> *Irunika Weeraratne*
>> *Software Engineer | WSO2, Inc. *
>> *Email : irun...@wso2.com *
>> *LinkedIn : https://lk.linkedin.com/in/irunikaw
>> *
>> *Mobile : +94712403314 <%2B94712403314>*
>> *Lean . Enterprise . Middleware*
>>
>>
>> On Tue, Nov 8, 2016 at 2:43 PM, Sameera Gunarathne 
>> wrote:
>>
>>> Congrats Malintha!!!
>>>
>>> On Tue, Nov 8, 2016 at 2:38 PM, Maneesha Wijesekara 
>>> wrote:
>>>
 Congratulations Malintha..!!

 On Tue, Nov 8, 2016 at 1:47 PM, Dilshani Subasinghe 
 wrote:

> Congrats Malintha :)
>
> On Tue, Nov 8, 2016 at 1:45 PM, Heshitha Hettihewa  > wrote:
>
>> Congratz Malintha!!!
>>
>> On Tue, Nov 8, 2016 at 1:32 PM, Chandana Napagoda 
>> wrote:
>>
>>> Hi Devs,
>>>
>>> It is my pleasure to welcome Malintha Fernando as a WSO2 Committer.
>>> Malintha has made some great contributions to WSO2 Governance Registry 
>>> and
>>> WSO2 Enterprise Store products during the last few months and in
>>> recognition of his commitment and contributions, he has been voted as a
>>> Committer for WSO2.
>>>
>>> @Malintha, welcome aboard and keep up the good work.
>>>
>>> Best Regards,
>>> Chandana
>>>
>>> --
>>> *Chandana Napagoda*
>>> Associate Technical Lead
>>> WSO2 Inc. - http://wso2.org
>>>
>>> *Email  :  chand...@wso2.com **Mobile :
>>> +94718169299 <%2B94718169299>*
>>>
>>> *Blog  :http://cnapagoda.blogspot.com
>>>  | http://chandana.napagoda.com
>>> *
>>>
>>> *Linkedin : http://www.linkedin.com/in/chandananapagoda
>>> *
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Heshitha Hettihewa
>> *Software Engineer*
>> Mobile : +94716866386
>> <%2B94%20%280%29%20773%20451194>
>> heshit...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards,
>
> Dilshani Subasinghe
> Software Engineer - QA *|* WSO2
> lean *|* enterprise *|* middleware
>
> Mobile : +94773375185
> Blog: dilshani.me
>
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Maneesha Wijesekara
 Software Engineer - EE Team
 WSO2 Inc.

 Email: manee...@wso2.com
 Linkedin: http://linkedin.com/in/maneeshawijesekara
 Mobile: +94712443119

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Sameera Gunarathne
>>> Software Engineer, WSO2 Inc. http://wso2.com
>>> 
>>> Email: samee...@wso2.com
>>> Mobile: +94714155561
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Menaka Jayawardena*
> *Software Engineer - WSO2 Inc*
> *Tel : 071 350 5470/ 071 885 1183*
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Committers += Kasun Thennakoon

2016-10-23 Thread Charini Nanayakkara
Congrats Kasun!!! :)

On Fri, Oct 21, 2016 at 8:02 PM, Sameera Gunarathne 
wrote:

> Congrats Kasun !!! 
> On Oct 21, 2016 1:18 PM, "Kasun Thennakoon"  wrote:
>
>> Thanks everyone.
>>
>> On Fri, Oct 21, 2016 at 12:22 PM, Prakhash Sivakumar 
>> wrote:
>>
>>> Congrats Kasun :)
>>>
>>> On Fri, Oct 21, 2016 at 11:43 AM, Shan Mahanama  wrote:
>>>
 Congrats Kasun :)

 On Fri, Oct 21, 2016 at 11:39 AM, Chanaka Cooray 
 wrote:

> Congratz kasun :)
>
> On Fri, Oct 21, 2016 at 9:13 AM, Chandana Napagoda 
> wrote:
>
>> Hi Devs,
>>
>> It is my pleasure to welcome Kasun Thennakoon as a WSO2 Committer.
>> Kasun has made some great contributions to WSO2 Enterprise Store and WSO2
>> Governance Registry products during the last few months and in 
>> recognition
>> of his commitment and contributions, he has been voted as a Committer for
>> WSO2.
>>
>> @Kasun, welcome aboard and keep up the good work.
>>
>> Best Regards,
>> Chandana
>>
>> --
>> *Chandana Napagoda*
>> Associate Technical Lead
>> WSO2 Inc. - http://wso2.org
>>
>> *Email  :  chand...@wso2.com **Mobile :
>> +94718169299 <%2B94718169299>*
>>
>> *Blog  :http://cnapagoda.blogspot.com
>>  | http://chandana.napagoda.com
>> *
>>
>> *Linkedin : http://www.linkedin.com/in/chandananapagoda
>> *
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Chanaka Cooray
> Software Engineer, WSO2 Inc. http://wso2.com
> Email: chana...@wso2.com
> Mobile: +94713149860
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Shan Mahanama

 Software Engineer, WSO2 Inc. http://wso2.com
 
 Email: sh...@wso2.com
 Mobile: +94712000498



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Prakhash Sivakumar
>>> Software Engineer | WSO2 Inc
>>> Platform Security Team
>>> Mobile : +94771510080
>>> Blog : https://medium.com/@PrakhashS
>>>
>>
>>
>>
>> --
>> *Kasun Thennakoon*
>> Software Engineer
>> WSO2, Inc.
>> Mobile:+94 711661919
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Committers += Ashen Weerathunga

2016-10-04 Thread Charini Nanayakkara
Congrats Ashen! :)

On Tue, Oct 4, 2016 at 3:56 PM, Mushthaq Rumy  wrote:

> Congrats Ashen!
>
> Thanks & Regards,
> Mushthaq
>
> On Tue, Oct 4, 2016 at 2:39 PM, Sameera Ramasinghe 
> wrote:
>
>> Congratz Ashen!!
>>
>> On Tue, Oct 4, 2016 at 1:56 PM, Grainier Perera 
>> wrote:
>>
>>> Congratulations Ashen.!
>>>
>>> On Tue, Oct 4, 2016 at 11:03 AM, Nirmal Fernando 
>>> wrote:
>>>
 Hi all,

 It is my pleasure to welcome Ashen Weerathunga as a WSO2 Committer. In
 recognition of Ashen's contributions to ML, Siddhi and IoT analytics, he
 has been voted as a Committer.

 Ashen, welcome aboard and keep up the good work.

 --

 Thanks & regards,
 Nirmal

 Team Lead - WSO2 Machine Learner
 Associate Technical Lead - Data Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: http://nirmalfdo.blogspot.com/



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Grainier Perera
>>> Software Engineer
>>> Mobile : +94716122384
>>> WSO2 Inc. | http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Sameera Ramasinghe*
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> mobile: *+94 714489682*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Mushthaq Rumy
> *Software Engineer*
> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
> Email : musht...@wso2.com
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middleware.
>
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] View Contents of In-Memory table

2016-08-31 Thread Charini Nanayakkara
Hi Aneela,

You can use RDBMS tables for this requirement. Please refer to [1]. You may
use WSO2_CARBON_DB as the datasource. Follow the steps in [2] to access
your tables

[1]
https://docs.wso2.com/display/CEP410/SiddhiQL+Guide+3.0#SiddhiQLGuide3.0-RDBMSEventTable

[2] http://www.vitharana.org/2012/04/how-to-browse-h2-database-of-wso2.html

Regards
Charini





On Wed, Aug 31, 2016 at 6:55 PM, Aneela Safdar  wrote:

> Hi,
>
> I am using in-memory tables in execution plans and there sometimes  I need
> occur to see the contents of these tables. I was wondering if there is any
> such way like RDBMS tables?
>
> Regards,
> Aneela Safdar
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] sub query in siddhi QL

2016-08-30 Thread Charini Nanayakkara
Hi Aneela,

If you need to count all the records (without grouping by employee_id) you
will have to do something similar to the following. (This is just one way
of addressing your requirement)

(define an in-memory table to store count)

define table CountTable (count long);

from inputStream#window.timeBatch(2 min)
select count() as count
insert into CountTable;

from inputStream#window.timeBatch(4 min)
select employee_id
group by employee_id
insert into TempStream;

from TempStream as t join CountTable as c
select t.employee_id, c.count
insert into OutputStream;


The execution plan would work if you have prior knowledge that all the
input events would arrive within 2 minutes. In the second query a larger
batch time is used to ensure that, the count is already written to table
CountTable, by the time events start being sent to TempStream.

Thank you
Charini



On Mon, Aug 29, 2016 at 11:59 PM, Aneela Safdar  wrote:

> Hi,
>
> How can I achieve this sql in siddhi query languge:
>
> select employee_id, (select count(*) from employees)
> from employees
>
> I want just a two columns of a stream, one legitimate and other is count
> of all records.
>
> Thanks,
>
> Regards,
> Aneela Safdar
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charini Vimansha Nanayakkara*
Software Engineer at WSO2

Mobile: 0714126293
E-mail: chari...@wso2.com
Blog: http://www.charini.me/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [CEP] Publishing Binary/Thrift Data using Java Client: Non-blocking Publisher vs Blocking Publisher

2016-06-26 Thread Charini Nanayakkara
Hi,

In a recent implementation where a stream needed to be simulated with 10
million events using a Java client, using publish method (blocking
publisher) was a better option than using tryPublish (non-blocking
publisher). The 10 million events were successfully sent to the stream with
publish method whereas data chunks continued to get discarded with
tryPublish regardless of specifying a timeout of considerable magnitude
(several seconds). If blocking publishing works better than non-blocking
publishing with such a considerable load, is there a purpose for the
existence of the latter? If so in what instances? Please clarify.

Thank you
Charini
-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Siddhi Query : group by results

2016-06-22 Thread Charini Nanayakkara
Hi Aneela,

The siddhi query you have specified processes each and every incoming
event. Since processing is done in real time, when the first event for
ts= 2016-05-08
09:00 arrives it gives count = 1 (due to no events with ts = 2016-05-08
09:00 having arrived earlier). When second event with ts = 2016-05-08 09:00
comes, we get count as 2 since an event with same ts arrived earlier as
well.

Best Regards,
Charini

On Wed, Jun 22, 2016 at 4:40 PM, Aneela Safdar  wrote:

> Hi all,
>
> I am having a trouble in digesting results of my group by query. My source
> stream named intermediateStream has data
>
>  ts   uid id_resp_h
> 2016-05-08 08:59  CLuCgz3HHzG7LpLwH9172.30.26.119
> 2016-05-08 09:00  C3WnnK3TgUf2cSzxVa172.30.26.127
> 2016-05-08 09:00  C3WnnK3TgUf2cSzxff172.30.26.119
>
> SIDDHI query is
>
> from intermediateStream
> select ts, count(ts) as ssh_logins
> group by ts
> insert into SSHOutStream;
>
> I am expecting output to be like
>
> ts ssh_logins
> 2016-05-08 08:59   1
> 2016-05-08 09:00   2
>
> But instead it returns
>
> ts ssh_logins
> 2016-05-08 08:59   1
> 2016-05-08 09:00   1
> 2016-05-08 09:00   2
>
> Any suggestions?
>
> Regards, Aneela Safdar
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP] wso2 cep java.lang.OutOfMemoryError: GC overhead limit exceeded

2016-06-20 Thread Charini Nanayakkara
Hi,

Heap issue was resolved using -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m.
Thanks Grainier, Abimaran and Sajith

Regards,
Charini

On Mon, Jun 20, 2016 at 12:01 PM, Sajith Ravindra <saji...@wso2.com> wrote:

> Hi Charini,
>
> How large are these events ? It's unlikely that Max attribute aggregator
> has caused this since it only keeps the values. The most probable reason is
> memory is not enough to hold the 3min window. We should be able to confirm
> this by analyzing the generated hepdump.
>
> As Abimaran has mentioned you should be able to overcome this issue by
> increasing the Xms and Xmx values. I assume you have used the default
> values for Xms and Xmx.
>
> Thanks
> *,Sajith Ravindra*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 2273550
> blog: http://sajithr.blogspot.com/
> <http://lk.linkedin.com/pub/shani-ranasinghe/34/111/ab>
>
> On Mon, Jun 20, 2016 at 10:32 AM, Abimaran Kugathasan <abima...@wso2.com>
> wrote:
>
>> Hi Charini,
>>
>> You have to either increase the allocated heap size (-Xmx) or the limit
>> check can be disabled by adding the option -XX:-UseGCOverheadLimit to
>> the command line.
>>
>> More information can be found here [1]
>>
>>
>> [1] :
>> http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom
>>
>> On Mon, Jun 20, 2016 at 10:02 AM, Charini Nanayakkara <chari...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I get $subject when attempting to execute Max aggregate function when a
>>> 3 min duration is considered on an external time stamp. The overhead limit
>>> is likely to have exceeded due to 9 000 000  events arriving within this 3
>>> min duration. Any suggestions on resolving this issue are appreciated.
>>>
>>> Thank you
>>> Charini
>>>
>>> --
>>> Charini Vimansha Nanayakkara
>>> Software Engineer at WSO2
>>> Mobile: 0714126293
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thanks
>> Abimaran Kugathasan
>> Senior Software Engineer
>>
>> Email : abima...@wso2.com
>> Mobile : +94 773922820
>>
>> <http://stackoverflow.com/users/515034>
>> <http://lk.linkedin.com/in/abimaran>
>> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
>> <https://twitter.com/abimaran>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [CEP] wso2 cep java.lang.OutOfMemoryError: GC overhead limit exceeded

2016-06-19 Thread Charini Nanayakkara
Hi,

I get $subject when attempting to execute Max aggregate function when a 3
min duration is considered on an external time stamp. The overhead limit is
likely to have exceeded due to 9 000 000  events arriving within this 3 min
duration. Any suggestions on resolving this issue are appreciated.

Thank you
Charini

-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] no viable alternative at input @import

2016-06-17 Thread Charini Nanayakkara
Hi,

Apart from what Yashothara pointed out, change how you have used dateFormat
extension in the query. time:dateFormat (ts,'-MM-dd HH:mm')  is the
proper way of using the function

Thanks
Charini

On Fri, Jun 17, 2016 at 12:34 PM, Yashothara Shanmugarajah <
yashoth...@wso2.com> wrote:

> Hi,
>
> You have only two streams ('bro.in.ssh.log:1.0.0 and bro.out.ssh.log:1.0.0).
> In this case you are using attribute name as "id.orig_h". In Siddhi
> definition we can't give attribute name as like that. You can not use .
> (full stop) in our attribute definition. You can use _ (underscore).
>
> Thanks.
>
> Best Regards,
> Yashothara.S
>
> Software Engineer
> WSO2
>
>
> On Fri, Jun 17, 2016 at 11:34 AM, Aneela Safdar 
> wrote:
>
>> Hi,
>>
>> I am a newbie here and trying to write a simple siddhi query by simply
>> importing a custom mapped stream. But as soon as I import it and validate
>> query, it gives above error.
>>
>> My complete query however is
>>
>> @Import('bro.in.ssh.log:1.0.0')
>> define stream inStream (ts string, uid string, id.orig_h string,
>> id.orig_p int, id.resp_h string, id.resp_p int, version int, client string,
>> server string, cipher_alg string, mac_alg string, compression_alg string,
>> kex_alg string, host_key_alg string, host_key string);
>>
>> @Export('bro.out.ssh.log:1.0.0')
>> define stream outStream (ts string, ssh_logins int);
>>
>> from inStream
>> select dateFormat (ts,'-MM-dd HH:mm') as formatedTs, count
>> group by formatedTs
>> insert into outStream;
>>
>> All I want to do is to count number of records in a log for a single
>> minute and export that time and count to an output Stream. But I am getting
>> errors even at the very first line.
>>
>> Regards, Aneela Safdar
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [wso2/siddhi] Has problems with Siddhi group by with a time window (#154)

2016-06-02 Thread Charini Nanayakkara
Hi Liangfei.Su,

This is the expected behavior of external time window. Since it's a moving
time window, you get an output for each incoming event. Due to the presence
of the group by keyword, it would give an aggregate output by considering
the events with the same uuid and similarityId, which arrived within last
two minutes.

If you need only one output per group use the external time batch window
instead. Ensure that all the events come within the time duration which you
specify here.

Regards,
Charini

On Fri, Jun 3, 2016 at 6:16 AM, Liangfei.Su  wrote:

> +WSO2 @DL
>
> Could someone eligible to explain?
>
> https://github.com/wso2/siddhi/issues/154
>
>
> Thanks,
> Ralph
>
>
> On Fri, Jun 3, 2016 at 8:21 AM, Garrett  wrote:
>
>> Has problems with Siddhi group by with a time window, I am able to get
>> the correct result aggregations for the group, but I receive one aggregated
>> result per event, not one per group.
>>
>> Here is the query:
>> define stream bootCorrelationStream (logLevel string, message string,
>> similarityId string, timestamp long, uuid string); @info(name =
>> 'bootCorrelation') from
>> bootCorrelationStream[logLevel=='ERROR']#window.externalTime(timestamp, 2
>> min) select similarityId, adanos:first(message) as message, min(timestamp)
>> as startTime, max(timestamp) as endTime group by uuid, similarityId insert
>> into tempStream;
>>
>> Here is the output:
>> Count: 1; message=ERROR first message, timestamp=2016-05-21 01:22:07.579
>> Count: 1; message=ERROR second message, timestamp=2016-05-21 01:22:08.314
>> Count: 1; message=ERROR third message, timestamp=2016-05-21 01:22:15.017
>> Count: 1; message=ERROR fourth message, timestamp=2016-05-21 01:25:07.017
>>
>> Here is the major code:
>> register callback
>> `
>> this.siddhiRuntime = new SiddhiRuntimeHolder();
>> this.siddhiRuntime.siddhiManager = new SiddhiManager();
>> ExecutionPlanRuntime executionPlanRuntime =
>> this.siddhiRuntime.siddhiManager.createExecutionPlanRuntime(this.getExecutionPlan());
>> this.siddhiRuntime.inputHandler =
>> executionPlanRuntime.getInputHandler(this.getStreamName());
>>
>> final SiddhiBolt siddhiBolt = this;
>> this.siddhiRuntime.queryCallback = new QueryCallback() {
>> @Override
>> public void receive(long timeStamp, 
>> org.wso2.siddhi.core.event.Event[] inEvents,
>> org.wso2.siddhi.core.event.Event[] removeEvents) {
>> siddhiBolt.queryCallback(timeStamp, inEvents, removeEvents);
>> }
>> };
>> executionPlanRuntime.addCallback("query", 
>> this.siddhiRuntime.queryCallback);
>> executionPlanRuntime.start();
>>
>>
>> query details
>>
>> public static String generateExecutionPlan() {
>> // make sure the fields' name sorted
>> StringBuilder executionPlane = new StringBuilder(" define stream
>> bootCorrelationStream ");
>> executionPlane.append("(logLevel string, message string, similarityId
>> string, timestamp long, uuid string); ");
>> executionPlane.append(" @info(name = 'bootCorrelation') ");
>> // externalTimeBatch(timestamp, 5 min), batch time window for specified
>> timestamp
>> executionPlane.append("from
>> bootCorrelationStream[logLevel=='ERROR']#window.externalTime(timestamp, 2
>> min) ");
>> executionPlane.append(" select similarityId, adanos:first(message) as
>> message, uuid, ");
>> executionPlane.append(" min(timestamp) as startTime, max(timestamp) as
>> endTime ");
>> executionPlane.append(" group by uuid, similarityId ");
>> executionPlane.append(" insert into tempStream; ");
>> appendLogs(executionPlane.toString());
>> return executionPlane.toString();
>> }
>>
>> callback details
>>
>> Map> tempMap = new HashMap>();
>> for (Event event : inEvents) {
>> Object[] data = event.getData();
>> BootCorrelationAggregationData aggregateData = new
>> BootCorrelationAggregationData();
>> aggregateData.setSimilarityId((String) data[0]);
>> aggregateData.setMessage((String) data[1]);
>> aggregateData.setUuid((String) data[2]);
>> aggregateData.setTimestamp((Long) data[3]);
>> if (!tempMap.containsKey(aggregateData.getUuid())) {
>> tempMap.put(aggregateData.getUuid(), new ArrayList());
>> }
>> tempMap.get(aggregateData.getUuid()).add(aggregateData);
>> }
>>
>> List emitList = new 
>> ArrayList();
>> Iterator> it = 
>> tempMap.entrySet().iterator();
>> while (it.hasNext()) {
>> Entry entry = 
>> it.next();
>> List temp = entry.getValue();
>> Collections.sort(temp, new 
>> Comparator() {
>> @Override
>> public int compare(BootCorrelationAggregationData o1, 
>> BootCorrelationAggregationData o2) {
>> return (int) (o1.getTimestamp() - o2.getTimestamp());
>> }
>> });
>>
>> if (temp.size() > 0) {
>> String message = String.format("Count: %s, for %s", temp.size(), 
>> ToStringBuilder.reflectionToString(temp.get(0)));
>> 

Re: [Dev] [DAS][LA] Add multiple events to a single event

2016-04-19 Thread Charini Nanayakkara
Hi,

Can we not use WSO2 ESB as a mediator in achieving this task. To my
knowledge we can do some processing with ESB prior to sending received
information as mail.

http://sparkletechthoughts.blogspot.com/2012/08/how-to-send-mails-using-wso2-esb.html

http://sparkletechthoughts.blogspot.com/2013/10/how-to-receive-emails-to-wso2-esb.html

Regards,
Charini

On Wed, Apr 20, 2016 at 9:47 AM, Sachith Withana  wrote:

> Nalaka,
>
> Currently we cannot schedule tasks for lucene queries or aggregate the
> results as you've described above.
>
> You would have to implement a task that would schedule the lucene queries,
> and a triggering mechanism that would be triggered through the lucene
> results.
>
> Then you would have to aggregate those results and send it as an event to
> the corresponding stream.
>
> @Gimantha: any other ways of doing this?
>
> Regards,
> Sachith
>
>
> On Tue, Apr 19, 2016 at 6:29 PM, Nalaka Perera  wrote:
>
>> Hi Sachith,
>>
>> In Log analyzer users are able to schedule a search and if search result
>> met trigger condition then it creates an alert. Search result may contains
>> multiple log lines.
>> Ex. Log data have persisted in a DAS table. Using lucene
>> search(_level:ERROR AND _timestamp:[timefrom TO timeto]) I got  8 log lines
>> which log level is WARN.
>>
>> User need to get data of results (fields data ex. time_stamp, level,
>> log_message .ect)  with the alert. Each alert has output stream which is
>> connected to the publisher(Email Publisher). User required  fields are
>> attributes of the output stream(outputStream_1.0.0 {timestamp STRING, level
>> STRING, log_message STRING}).
>>
>> Let's say an alert condition is met and assume alert publisher is email,
>> so now publisher send multiple emails since the search result has multiple
>> log lines/events.
>>
>> But what I need is, when search result  met the trigger condition at
>> scheduled time it should send one email which contains all the field data.
>> Ex. Email should contains following field data
>>  "_timestamp": "2016-03-21 12:04:11,557", "_level": "ERROR",
>> "_log_message": "The [action] cannot be processed at the receiver. "
>>  "_timestamp": "2016-03-21 12:04:45,597", "_level": "ERROR",
>> "_log_message": "The [action] cannot be processed at the receiver. "
>>  "_timestamp": "2016-03-21 12:04:09,605", "_level": "ERROR",
>> "_log_message": "The [action] cannot be processed at the receiver. "
>>  "_timestamp": "2016-03-21 12:04:44,301", "_level": "ERROR",
>> "_log_message": "The [action] cannot be processed at the receiver. "
>>
>> Is that possible?
>>
>> Thank you,
>> Nalaka
>>
>> On Tue, Apr 19, 2016 at 3:18 PM, Sachith Withana 
>> wrote:
>>
>>> Hi Nalaka,
>>>
>>> Can you provide an example?
>>>
>>> WDYM by adding multiple events into a single event?
>>>
>>> Regards,
>>> Sachith
>>>
>>> On Tue, Apr 19, 2016 at 2:52 PM, Nalaka Perera  wrote:
>>>
 Hi all,

 How do we send multiple results (events) from a lucene search and add
 them as a single event to a publish stream to create one alert (ex.Email)?

 Thank you,
 Nalaka
 --
 *Nalaka Perera*

 *Intern - Software Engineering*
 *WSO2*

 *Mobile: * *+94 71 9165748 <%2B94%2071%209165748>*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Sachith Withana
>>> Software Engineer; WSO2 Inc.; http://wso2.com
>>> E-mail: sachith AT wso2.com
>>> M: +94715518127
>>> Linked-In: 
>>> https://lk.linkedin.com/in/sachithwithana
>>>
>>
>>
>>
>> --
>> *Nalaka Perera*
>>
>> *Intern - Software Engineering*
>> *WSO2*
>>
>> *Mobile: * *+94 71 9165748 <%2B94%2071%209165748>*
>>
>
>
>
> --
> Sachith Withana
> Software Engineer; WSO2 Inc.; http://wso2.com
> E-mail: sachith AT wso2.com
> M: +94715518127
> Linked-In: 
> https://lk.linkedin.com/in/sachithwithana
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 DAS: SPARK SQL query with UNION producing errors

2016-03-08 Thread Charini Nanayakkara
Hi Lahiru,
In this instance no two tables comprise of identical rows. Therefore the
query doesn't execute combines. I presume that union would be more
efficient than join in such a scenario

Thank you!

On Tue, Mar 8, 2016 at 1:43 PM, Lahiru Cooray <lahi...@wso2.com> wrote:

> Hi Charini,
> In addition, if you could get the same resultset using sql joins (instead
> of unions) you can increase the performance when querying.
> When using union's, it takes a considerable effort when combining the
> distinct results.
>
> On Tue, Mar 8, 2016 at 1:23 PM, Charini Nanayakkara <chari...@wso2.com>
> wrote:
>
>> Hi Niranda,
>> Thanks a lot! this worked
>>
>> On Tue, Mar 8, 2016 at 12:50 PM, Niranda Perera <nira...@wso2.com> wrote:
>>
>>> Hi Charini,
>>>
>>> there is a problem with the query here. use the following query
>>>
>>> INSERT OVERWRITE TABLE All_three
>>>
>>> select * from (
>>> SELECT SYMBOL, VOLUME FROM First
>>> UNION
>>> SELECT SYMBOL, VOLUME FROM Middle
>>> UNION
>>> SELECT SYMBOL, VOLUME FROM Third
>>>
>>> ) temp;
>>>
>>> Essentially what we do here is, wrapping the union result into one
>>> temporary data element named 'temp' and select everything from there.
>>>
>>> SparkSQL parser only takes one single select element in the insert
>>> queries, and at the end of a select query it expects a limit (if
>>> available). therefore, you need to wrap the subsequent select statements
>>> into one select element.
>>>
>>> Hope this resolves your issue
>>>
>>> Best
>>>
>>> On Tue, Mar 8, 2016 at 8:47 AM, Charini Nanayakkara <chari...@wso2.com>
>>> wrote:
>>>
>>>> Hi,
>>>> The following query was attempted to be executed when performing batch
>>>> analytics with WSO2 DAS using Spark SQL. Tables 'First', 'Middle' and
>>>> 'Third' are required to be combined and written to table 'All_three'.
>>>>
>>>> INSERT OVERWRITE TABLE All_three SELECT SYMBOL, VOLUME FROM First UNION 
>>>> SELECT SYMBOL, VOLUME FROM Middle UNION SELECT SYMBOL, VOLUME FROM Third;
>>>>
>>>>
>>>> Following error is displayed on WSO2 DAS when this query is executed:
>>>>
>>>> ERROR: [1.79] failure: ``limit'' expected but `union' found INSERT 
>>>> OVERWRITE TABLE X1234_All_three SELECT SYMBOL, VOLUME FROM X1234_First 
>>>> UNION SELECT SYMBOL, VOLUME FROM X1234_Middle UNION SELECT SYMBOL, VOLUME 
>>>> FROM X1234_Third ^
>>>>
>>>>
>>>> Using LIMIT with UNION is not a necessity to the best of my knowledge.
>>>> Enclosing the SELECT queries in parentheses too was attempted which didn't
>>>> work. What am I doing wrong here? Thank you in advance!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Charini Vimansha Nanayakkara
>>>> Software Engineer at WSO2
>>>> Mobile: 0714126293
>>>>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Niranda Perera*
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94-71-554-8430
>>> Twitter: @n1r44 <https://twitter.com/N1R44>
>>> https://pythagoreanscript.wordpress.com/
>>>
>>
>>
>>
>> --
>> Charini Vimansha Nanayakkara
>> Software Engineer at WSO2
>> Mobile: 0714126293
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Lahiru Cooray*
> Software Engineer
> WSO2, Inc.;http://wso2.com/
> lean.enterprise.middleware
>
> Mobile: +94 715 654154
>



-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 DAS: SPARK SQL query with UNION producing errors

2016-03-07 Thread Charini Nanayakkara
Hi Niranda,
Thanks a lot! this worked

On Tue, Mar 8, 2016 at 12:50 PM, Niranda Perera <nira...@wso2.com> wrote:

> Hi Charini,
>
> there is a problem with the query here. use the following query
>
> INSERT OVERWRITE TABLE All_three
>
> select * from (
> SELECT SYMBOL, VOLUME FROM First
> UNION
> SELECT SYMBOL, VOLUME FROM Middle
> UNION
> SELECT SYMBOL, VOLUME FROM Third
>
> ) temp;
>
> Essentially what we do here is, wrapping the union result into one
> temporary data element named 'temp' and select everything from there.
>
> SparkSQL parser only takes one single select element in the insert
> queries, and at the end of a select query it expects a limit (if
> available). therefore, you need to wrap the subsequent select statements
> into one select element.
>
> Hope this resolves your issue
>
> Best
>
> On Tue, Mar 8, 2016 at 8:47 AM, Charini Nanayakkara <chari...@wso2.com>
> wrote:
>
>> Hi,
>> The following query was attempted to be executed when performing batch
>> analytics with WSO2 DAS using Spark SQL. Tables 'First', 'Middle' and
>> 'Third' are required to be combined and written to table 'All_three'.
>>
>> INSERT OVERWRITE TABLE All_three SELECT SYMBOL, VOLUME FROM First UNION 
>> SELECT SYMBOL, VOLUME FROM Middle UNION SELECT SYMBOL, VOLUME FROM Third;
>>
>>
>> Following error is displayed on WSO2 DAS when this query is executed:
>>
>> ERROR: [1.79] failure: ``limit'' expected but `union' found INSERT OVERWRITE 
>> TABLE X1234_All_three SELECT SYMBOL, VOLUME FROM X1234_First UNION SELECT 
>> SYMBOL, VOLUME FROM X1234_Middle UNION SELECT SYMBOL, VOLUME FROM 
>> X1234_Third ^
>>
>>
>> Using LIMIT with UNION is not a necessity to the best of my knowledge.
>> Enclosing the SELECT queries in parentheses too was attempted which didn't
>> work. What am I doing wrong here? Thank you in advance!
>>
>>
>>
>>
>>
>> --
>> Charini Vimansha Nanayakkara
>> Software Engineer at WSO2
>> Mobile: 0714126293
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 <https://twitter.com/N1R44>
> https://pythagoreanscript.wordpress.com/
>



-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 DAS: SPARK SQL query with UNION producing errors

2016-03-07 Thread Charini Nanayakkara
Hi,
The following query was attempted to be executed when performing batch
analytics with WSO2 DAS using Spark SQL. Tables 'First', 'Middle' and
'Third' are required to be combined and written to table 'All_three'.

INSERT OVERWRITE TABLE All_three SELECT SYMBOL, VOLUME FROM First
UNION SELECT SYMBOL, VOLUME FROM Middle UNION SELECT SYMBOL, VOLUME
FROM Third;


Following error is displayed on WSO2 DAS when this query is executed:

ERROR: [1.79] failure: ``limit'' expected but `union' found INSERT
OVERWRITE TABLE X1234_All_three SELECT SYMBOL, VOLUME FROM X1234_First
UNION SELECT SYMBOL, VOLUME FROM X1234_Middle UNION SELECT SYMBOL,
VOLUME FROM X1234_Third ^


Using LIMIT with UNION is not a necessity to the best of my knowledge.
Enclosing the SELECT queries in parentheses too was attempted which didn't
work. What am I doing wrong here? Thank you in advance!





-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev