Queries, Views, and Joins

1-14 Oracle Complex Event Processing CQL Language Reference query id=q0[CDATA[ select from S where c1 50 ]]query rules processor A join is a query that combines rows from two or more streams, views, or relations. For more information, see Section 18.4, Joins . For more information, see Chapter 18, Oracle CQL Queries, Views, and Joins .

1.1.7 Pattern Recognition

The Oracle CQL MATCH_RECOGNIZE construct is the principle means of performing pattern recognition. A sequence of consecutive events or tuples in the input stream, each satisfying certain conditions constitutes a pattern. The pattern recognition functionality in Oracle CQL allows you to define conditions on the attributes of incoming events or tuples and to identify these conditions by using String names called correlation variables. The pattern to be matched is specified as a regular expression over these correlation variables and it determines the sequence or order in which conditions should be satisfied by different incoming tuples to be recognized as a valid match. For more information, see Chapter 19, Pattern Recognition With MATCH_ RECOGNIZE .

1.1.8 Event Sources and Event Sinks

An Oracle CEP event source identifies a producer of data that your Oracle CQL queries operate on. An Oracle CQL event sink identifies a consumer of query results. This section explains the types of event sources and sinks you can access in your Oracle CQL queries and how you connect event sources and event sinks.

1.1.8.1 Event Sources

An Oracle CEP event source identifies a producer of data that your Oracle CQL queries operate on. In Oracle CEP, the following elements may be event sources: ■ adapter JMS, HTTP, and file ■ channel ■ processor ■ table ■ cache Oracle CEP event sources are typically push data sources: that is, Oracle CEP expects the event source to notify it when the event source has data ready. Note: In Oracle CEP, you must use a channel to connect an event source to an Oracle CQL processor and to connect an Oracle CQL processor to an event sink. A channel is optional with other Oracle CEP processor types. For more information, see Section 1.1.1, Streams and Relations . Introduction to Oracle CQL 1-15 Oracle CEP relational database table and cache event sources are pull data sources: that is, Oracle CEP polls the event source on arrival of an event on the data stream. For more information, see: ■ Section 1.1.9, Table Event Sources ■ Section 1.1.10, Cache Event Sources

1.1.8.2 Event Sinks

An Oracle CQL event sink connected to a CQL processor is a consumer of query results. In Oracle CEP, the following elements may be event sinks: ■ adapter JMS, HTTP, and file ■ channel ■ processor ■ cache You can associate the same query with more than one event sink and with different types of event sink.

1.1.8.3 Connecting Event Sources and Event Sinks

In Oracle CEP, you define event sources and event sinks using Oracle CEP IDE for Eclipse to create the Event Processing Network EPN as Figure 1–5 shows. In this EPN, adapter PriceAdapter is the event source for channel priceStream; channel priceStream is the event source for Oracle CQL processor filterFanoutProcessor. Similarly, Oracle CQL processor filterFanoutProcessor is the event sink for channel priceStream. Figure 1–5 Event Sources and Event Sinks in the Event Processing Network For more information, see: ■ Section 1.1.1, Streams and Relations ■ Section 18.1, Introduction to Oracle CQL Queries, Views, and Joins ■ Oracle Complex Event Processing Developers Guide for Eclipse

1.1.9 Table Event Sources

Using Oracle CQL, you can access tabular data, including: ■ Section 1.1.9.1, Relational Database Table Event Sources ■ Section 1.1.9.2, XML Table Event Sources ■ Section 1.1.9.3, Function Table Event Sources For more information, see Section 1.1.8, Event Sources and Event Sinks