O'Reilly logo

Getting Started with Oracle Event Processing 11g by Lloyd Williams, Robin J. Smith, Alexandre Alves

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pattern matching

One of the main features of CEP is the ability to detect patterns of events directly on a stream, even complex conditions such as sequences, alternations, and non-events (missing events). For example, detect if a particular event is followed by another event within some time period. This feature is generally called pattern matching.

In CQL, pattern matching is realized through the MATCH_RECOGNIZE operator. Being a streaming-processing related feature, MATCH_RECOGNIZE is a stream-to-stream operator, meaning that it applies directly to a stream, without the need to convert it to a relation using a Window operator as you have done in the past for some of the other features like joins.

Let's take a look at the basic skeleton for MATCH_RECOGNIZE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required