Flink SQL examples

Use these SQL examples for frequently used functions, syntax, and techniques in Cloudera SQL Stream Builder (SSB).

SSB runs Flink SQL, which is based on Apache Calcite. The examples use sample tables, such as payments and orders. Replace the table and column names with your own. In the examples, eventTimestamp is the event time column that SSB adds to Kafka tables. For more information, see Using the default Kafka timestamps.

To try an example, paste it into the SQL editor of a job in the Streaming SQL Console, and run the job. To check the output of a query, add an INSERT INTO clause that writes it to a sink table, and read the sink.