0

I am actually new to Wso2 and Siddhi. So first, let me explain what I am trying to do. I am trying to join two streams (RG and MW) and insert the query's result into (OutStream). I am trying to get the sensors's names which have a reading value > Threshold. Below is my trial, I am trying to figure out if it does what I am trying to do as when I tried to define a UI publisher for the (OutStream) nothing appeared. Thank you.

@Import('From_Middle_Ware:1.0.0')
define stream MW (meta_SensorID string, SensorReadingValue double, Priority 
int);

@Import('FromRGModule:1.0.0')
define stream RG (meta_TempID int, correlation_InSensor string, 
correlation_OutSensor string, correlation_ActionToOutSensor double, 
Threshold double);

@Export('OutStream:1.0.0')
define stream Filtered (meta_SensorName string, SensorValue double);

from MW #window.length(2000) as A
join RG #window.length(2000) as B
on A.meta_SensorID== B.correlation_InSensor and 
A.SensorReadingValue>B.Threshold
select A.meta_SensorID , A.SensorReadingValue
insert into OutStream;
Community
  • 1
  • 1
Jig_9
  • 1
  • 2

1 Answers1

0

Purpose of the UI publisher is to push data to the CEP Dashboard. If you have added an UI publisher, you can create a real time gadget in the dashboard and place it in a dashboard to view the data [1]. Step by step description is available in the CEP documentation [1].

If you just want to see the output data, i would suggest you to use a logger publisher [2] which will print OutStream events in the CEP running terminal.

[1] https://docs.wso2.com/display/CEP420/Visualizing+Results+in+the+Analytics+Dashboard

[2] https://docs.wso2.com/display/CEP420/Logger+Event+Publisher

Tharik Kanaka
  • 2,490
  • 6
  • 31
  • 54