...
The following query forwards a processed event as an output to the
cronTriggerStream
event stream every 10 seconds.Code Block language sql define trigger cronTriggerStream at '*/10 * * * * ?' ;
The following query merges the
periodicalTriggerStream
andsensorStream
event streams. Only the values of the attributes specified in the query are merged. Attribute values are taken from thesensorStream
event stream and inserted into theperiodicalTriggerStream
event stream.Code Block language sql from periodicalTriggerStream join sensorStream#window.time(10 sec) select meta_timestamp, meta_isPowerSaverEnabled, meta_sensorId, meta_sensorName, correlation_longitude, correlation_latitude, triggered_time, humidity, sensorValue insert into periodicalTriggeredSensorStream;
The following query merges the
cronTriggerStream
andsensorStream
event streams. Only the values of the attributes specified in the query are merged. Attribute values are taken from thesensorStream
event stream and inserted into thecronTrigerredSensorStream
event stream.Code Block language sql from cronTriggerStream join sensorStream#window.time(10 sec) select meta_timestamp, meta_isPowerSaverEnabled, meta_sensorId, meta_sensorName, correlation_longitude, correlation_latitude, triggered_time, humidity, sensorValue insert into cronTriggeredSensorStream;
Prerequisites
See Prerequisites in the CEP Samples Setup pageSet up the prerequisites required for all samples.
Building the sample
Start the WSO2 CEP server with the sample configuration numbered 0119. For instructions, see Starting sample CEP configurations. This sample configuration does the following:
...