SAP Sybase Event Stream Processor Studio includes several example
projects.
The Welcome page provides samples of completed projects that you can explore
and run. You can view the examples in ESP Studio and run them against sample data installed with
the product. Stepping through examples in 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
intervals) are set when the module is called.
- Pattern Matching – Provides a simple example of situation detection: watching
for a pattern of events. The example demonstrates how 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.
- 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 Samples on the
Welcome page.
For more examples of CCL and SPLASH code, see the Examples
Guide and the Programmers Guide.