You have learned how to transform a stream into a relation by using WINDOW operators, and then how to convert a relation back to a stream by using the ISTREAM
/DSTREAM
/RSTREAM
family of operators. But why do we convert to relations to begin with? By converting streams to relations, you can leverage the full power of SQL, as we are used to it in a database. After all, SQL works directly on top of relations.
CQL supports most of the SQL99 commands, which we explore in this section.
In CQL, you can join multiple sources, but all sources must be relations or streams that have been converted to relations using a window operator.
Joins are very useful as a mechanism for enriching events with contextual data that don't change often. For example, consider the following query that enriches a stock market feed event with the full address of the said stock:
SELECT S1.symbol as symbol fullName FROM reutersMarketFeed[RANGE 60 SECONDS] AS S1, tickerListing AS R1 WHERE S1...