Syntax Element | Description |
event_type | Name of the event type you are interested in. You must have specified this event type in the inputs section. |
every | Specify the optional every modifier in conjunction with the select and having clauses. This lets you specify a pattern that aggregates event field values in order to find data based on many sets of events. See Aggregating event field values. |
wait | Specify the optional wait modifier followed by a time literal or a float expression. A wait modifier indicates a period of elapsed time at the beginning of the event pattern and/or at the end of the event pattern. A float expression always indicates a number of seconds, See Query wait operator. |
identifier | Coassign the matching event to this identifier. A coassignment variable specified in an event pattern is within the scope of the find block and it is a private copy in that block. The exception to this is in an aggregating find statement, only the projection expression can use the coassignments from the pattern. The procedural block of code can use projection coassignments and any parameters, but it cannot use coassignments from the pattern. Changes to the content that the variable points to do not affect any values outside the query. Unlike EPL event expressions, you need not declare this identifier before you coassign a value to it. In an event pattern in a find statement, each coassignment variable identifier must be unique. You must ensure that an identifier in an event pattern does not conflict with an identifier in the parameters section, or inputs section. |
find_operator | Optionally specify and or -> and then specify an event_type and coassignment variable. Parentheses are allowed in the pattern specification and you can specify multiple operators, each followed by an event_type and coassignment variable. For example, the following is a valid find statement: find (A:a1 -> ((A:a2)) -> (A:a3) -> (A:a4 -> A:a5 -> A:a6) -> (((A:a7) -> A:a8) -> A:a9) -> A:a10) { print "query with 10: "+a1.toString()+ " - "+a10.toString(); } |
where_clause | To filter which events match, specify where followed by a Boolean expression that refers to the events you are interested in. The Boolean expression must evaluate to true for the events to match. The where clause is optional. Coassignment variables specified in the find or select statements are in scope in the where clause. Also available in a where clause are any parameter values and key values. This where clause applies to the event pattern and is referred to as a find where clause to distinguish it from a where clause that is part of a without cause, which is referred to as a without where clause. See Query conditions. |
within_clause | A within clause sets the time period during which events in the match set must have been added to their windows. A pattern can specify zero, one, or more within clauses. See Query conditions. |
without_clause | A without clause specifies event types whose presence prevents a match. See Query conditions. |
select_clause | A select clause indicates that aggregate values are to be computed. See Aggregating event field values. |
having_clause | A having clause restricts when the procedural code is invoked for a pattern that aggregates values. See Aggregating event field values. |
block | Specify one or more statements that operate on the matching event(s). For details about code that is permissible in the find block, see Acting on pattern matches. Items available in a find block can include: Any parameters defined in the parameters section Coassignment variables specified in the event pattern (or projection coassignments in the case of aggregating find statements). Key values |