Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Working with Streams and Stream Queries
 
Working with Streams and Stream Queries
 
Introduction to streams and stream networks
Defining streams
Using output from streams
Defining stream queries
Defining custom aggregate functions
Working with lots that contain multiple items
Stream network lifetime
Using dynamic expressions in stream queries
Troubleshooting and stream query coding guidelines
EPL lets you create two kinds of queries:
*Self-contained queries are processing elements that communicate with other self-contained queries, and with their environment, by receiving and sending events. Self-contained queries are designed to be multithreaded and to scale across machines. A self-contained query is sometimes referred to as an Apama query. This kind of query is defined in a .qry file, which cannot contain a monitor. See Defining Queries.
*Stream queries operate on streams of items to generate more valuable streams that contain derived items. Stream queries are defined in monitors. The following topics provide information about stream queries.
In stream queries, derived items can be of any EPL type. You can use standard relational operations, such as filters, joins, aggregation, and projection, to generate items. For example, you can define a query that converts a stream of raw tick data into a stream of volume-weighted average price (VWAP) items.
Stream-based language elements allow operations that refine events to be expressed more clearly and concisely than when using procedural language constructs such as event listeners. In particular, applications that need to calculate one value based on multiple items from an input stream are simpler and more efficient when written with stream queries.
Apama provides sample code that uses streams and stream queries in the samples\monitorscript directory of your Apama installation directory.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.