Flex Operators

Flex operators provide extensibility to CCL, allowing custom event handlers, written in SPLASH, to produce derived streams or windows.

A flex operator produces derived streams, windows, or delta streams in the same way that a CREATE statement produces these elements. However, a CREATE statement uses a CCL query to derive a new window from the inputs, whereas a flex operator uses a SPLASH script.

Flex operators make CCL extensible, allowing you to implement event processing logic that would be difficult to implement in a declarative SELECT statement. SPLASH gives you process control and provides data structures that can retain state from one event to the next.

All of the features of SPLASH are available for use in a flex operator, including:
Data structures
  • Variables
  • EventCache (windows)
  • Dictionaries
  • Vectors
Control structures
  • While
  • If
  • For

A flex operator can take any number of inputs, and they can be any mix of streams, delta streams, or windows. You can write a splash event handler for each input. When an event arrives on that input, the associated SPLASH script or method is invoked.

You need not have a method for every input. Some inputs may merely provide data for use in methods associated with other inputs; for inputs without an associated method, incoming events do not trigger an action, but are accessible to other methods in the same flex operator.

See the SPLASH Programmers Guide for details on writing the flex methods.

Related reference
CREATE FLEX Statement