The same operation as SQL JOIN can be described for an event stream in complex event processing language. In addition to event streams, named windows and relational database (RDB) data can also be joined.
Syntax:
... from eventStreamDefinition [as name] [unidirectional]
((left|right|full) outer | inner) join eventStreamDefinition [as name] [unidirectional]
on property = property [and property = property] [and ...]
[ ((left|right|full) outer | inner) join eventStreamDefinition on ...] ...
For JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, FULL OUTER JOIN, and INNER JOIN can be specified. Use the ON clause to specify the property for joining each event stream.
In addition, INNER JOIN can be executed by tying event stream definitions together with commas (,). In this case, an ON clause need not be specified and the condition can be specified in a WHERE clause.
Each of the event streams being joined must specify a data window view or another view. A view does not need to be specified for event streams for which UNIDIRECTIONAL is specified, and named windows.
Generally, JOIN is executed for the event streams in the FROM clause regardless of which of the event streams the event arrives at. If the UNIDIRECTIONAL keyword is specified, JOIN is executed only when an event arrives at that event stream. The UNIDIRECTIONAL keyword can be specified for only one event stream.