简体   繁体   中英

WSO2 CEP siddhi Filter issue

I am trying to use the siddhi query langage but it seems I am misusing it.

I have some events with the following streamdef :

{  'name':'eu.ima.stat.events',  'version':'1.1.0',  'nickName': 'Flux event Information',  'description': 'Details of Analytics Statistics',  'metaData':[          {name:'HostIP','type':'STRING'}  ],  'correlationData':[          {name:'ProcessType','type':'STRING'},          {name:'Flux','type':'STRING'},          {name:'ReferenceId','type':'STRING'}  ],  'payloadData':[          {'name':'Timestamp','type':'STRING'},          {'name':'EventCode','type':'STRING'},          {'name':'Type','type':'STRING'},          {'name':'EventInfo','type':'STRING'}  ]}

I am just trying to filter events with the same processus value and the same flux value using a query like this one :

from myEventStream[processus == 'SomeName' and flux == 'someOtherName' ]
insert into someStream
processus, flux, timestamp

Whenever I try this, no output is generated. When I get rid of the filter

from myEventStream
insert into someStream
processus, flux, timestamp

all my events are ther in the output.

What's wrong with my query ?

I can see some spell mistakes in your query... In the filter you have used a variable name called "processus" which is not in the event stream. That is why this query does not give any output. When you are creating a bucket in WSO2 CEP, make sure that the bucket is deployed correctly in the CEP server and check in the management console.(CEP BUCKETS --> List).

On your situation. bucket will not be deployed because of the wrong configuration and also there will be error messages printed in the terminal where CEP server runs. After correcting this mistake your query will run perfectly without any issue...

Regards, Mohan

Considering Mohan's answer,rename 'ProcessType' or change your query like this

from myEventStream[ ProcessType == 'SomeName' and flux == 'someOtherName' ]
insert into someStream
ProcessType, flux, timestamp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM