Event Stream Processor Studio includes several example
projects.
You can view the examples in ESP Studio and run them against sample data
installed with the product. Stepping through examples in the Studio Learning perspective
is an ideal way to watch a simplified set of event data flow through the system.
The examples include:
- IndexesCalculation – Shows how continuous computations can be applied to a stream of market
prices to deliver insight into the market. This example demonstrates
reusable modules. Each of the market calculations is defined in an external
module, that is, a module defined in a separate CCL file, and then imported
into the project. Parameters (in this case, time and itnervals) are set when
the module is called.
- Pattern Matching – Simple example of situation detection: watching for a pattern of events. The
scenario in this example is to watch for employee fraud in a retail setting,
based on transaction patterns from a point-of-sale system. The example
applies three Filter queries to an input stream of transactions, and then
uses a Pattern query (CCL MATCHING clause) to produce a Possible Fraud Alert
event when all of the criteria occur in the defined time interval.
- Prepay Biller – Loads call events (CDRs), such as those generated from a telephone carrier
network, and applies account and call plan information to create a billing
record for each call, and maintain a balance of prepaid minutes. The example
demonstrates joins, aggregation, and using joins to augment the events with
reference data.
- Top 3 Prices – Creates a window showing the top three distinct trade prices for each
symbol. The example uses a Flex operator to create a custom operator with an
embedded SPLASH script. A Flex operator creates a single output stream or
window, and allows greater flexibility and control than a simple SELECT
statement. The example also uses a named schema, which can be defined once
and shared by the input stream and output window.
- VWAP – Defines an input stream of stock market prices, as they might be reported
from an exchange, and computes a moving average price called the volume
weighted average price (VWAP). Uses a filter, and a simple aggregation
(GROUP BY).
For details of each example, click the example name in the Learning
Perspective.
For more examples of CCL and SPLASH code, see the Examples
Guide and the Programmers Guide.