The latest version for DAS is WSO2 Data Analytics Server 3.1.0. View documentation for the latest release.
WSO2 Data Analytics Server is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

All docs This doc
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
||
Skip to end of metadata
Go to start of metadata

Introduction

This sample demonstrates how to set up an execution plan with a filter query that checks for some specific conditions and then outputs a custom alert event when the conditions are true. Custom events are events with custom mappings that do not adhere to the default event formats. For more information on event formats, see Event Formats. This sample uses the Event Simulator for inputs and the logger publisher for logging the outputs to the DAS console.

The execution plan used in this sample is as follows:

from TempStream [ roomNo > 245 and roomNo <= 365 and temp > 40 ]
select roomNo, temp
insert into AlertServerRoomTempStream ;

The first query does the following.

  • Processes the events received through the TempStream stream.
  • Checks for the condition roomNo > 245 and roomNo <= 365 and temp > 40 inside the filter.
  • If the condition is true, 
    • Selects the attributes (i.e., roomNo, temp) specified under the select clause, from each event received.
    • Emits these events as output events through the AlertServerRoomTempStream stream.

Prerequisites

Set up the prerequisites required for all samples.

Building the sample

Start the WSO2 DAS server with the sample configuration numbered 0103. For instructions, see Starting sample CEP configurations.

This sample configuration points the default Axis2 repo to <DAS_HOME>/samples/cep/artifacts/0103 (by default, the Axis2 repo is <DAS_HOME>/repository/deployment/server).

Executing the sample

  1. Log into the DAS Management Console which is located at https://<DAS_HOST>:<DAS_PORT>/carbon.

  2. Go to Tools -> Event Simulator. Under the Multiple Events section, you can see the listed events.csv file that contains some sample data. Click Play to start sending sample events from the file.
    Output events received from the DAS console are logged as follows. This sample uses the logger adaptor to log output events to the console.

  • No labels