myVertica  

Pattern Matching

The Vertica event series pattern matching functionality lets you screen large amounts of historical data in search of event patterns.

Overview

As the name suggests, event patterns are simply series of “events” that occur in a order, or “pattern” that you specify. Events are evaluated for each row. When Vertica finds a contiguous sequence of rows that conforms to the pattern you define in the PATTERN subclause of the MATCH clause it outputs the rows that contribute to the match. Rows not part of the match (do not satisfy one or more predicates) are not output.

As a simple example, let’s say you want to find places in your records where event A is following by event B and then event C. With pattern matching, Vertica will return the following shaded rows:

Pattern Matching Functions

Used with the MATCH Clause, the Vertica pattern matching functions return additional data about the patterns found. For example, you can use these functions to return values representing the name of the event or pattern that matched the input row, the sequential number of the match, or a partition-wide unique identifier for the instance of the pattern that matched.

Pattern matching functions must be used in MATCH Clause syntax. For more information, see Pattern Matching Functions in the Vertica documentation.

Learn More

For more information about Pattern Matching, see Event Series Pattern Matching in the Vertica core documentation.