Run a pattern matching query that watches for a specific pattern of incoming events on one or more inputs and produces an output event when the pattern is detected. Pattern uses the CCL MATCHING clause.
In the Visual editor Palette, in Streams and Windows, click Pattern ().
Select a location in the diagram and click to
add the shape.
Connect the Pattern shape to one or more streams or windows that are the inputs to query.
Add columns:
Click Copy Columns from Input () in the shape toolbar to select the columns to copy into the schema for the Pattern query.
This is the schema of the new event that is produced when the pattern is detected.
Add
additional columns by clicking Add Column Expression in
the shape toolbar.
Edit a column
expression by double-clicking to open the inline editor, or by selecting the expression
and pressing Ctrl+F2 to open it in the pop-up
editor.
Create and edit a pattern expression:
Click Add Pattern
Enter an alias for the event.
Enter either a time interval or parameters.
To define the expression, right-click Pattern to add an event. Continue right-clicking elements of the expression to add operators and refine the event expression. Then click Next.
Click Add to add a join condition.
For details of valid pattern expressions, see ON Clause: Pattern Matching Syntax in the CCL Programmers Guide.
(Optional) Use the toggle option to designate the pattern object as LOCAL or OUTPUT.