Developing Apama Applications > Apama EPL Reference > Variables > Variable declarations > Reference-type variable declarations > Stream variable declarations
Stream variable declarations
A stream variable references a linearly ordered flow of items that have been processed by the correlator. The items in a stream are always ordered according to the order in which the correlator processed them. When more than one item arrives in a lot the correlator preserves the order in which it processed them.
StreamDeclaration
Rule components
An item in a stream can be any Apama data type. A particular stream can contain only one type of item.
The optional initializer can be a stream source template, a stream query definition, or any other expression that returns a stream. A stream source template is an event template that specifies the all keyword and no other qualifiers. See Stream source templates. A stream query definition specifies a query that the correlator applies continuously to one or two streams. See Stream queries.
Examples
stream<Tick> ticks := all Tick(symbol=”APMA”);
stream<integer> derived := from a in sA select a.i;
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.