SQL quick reference

CREATE STREAM

Register a stream on the bottom layer topic with the same name as the stream. An exception will be thrown if the stream is already created. See CREATE STREAM.

  1. CREATE STREAM stream_name [AS select_query] WITH (FORMAT = stream_format);

SELECT

Continuously pulls records from the stream(s) specified. It is usually used in an interactive CLI to monitor realtime changes of data. Note that the query writes records to a random-named stream. See SELECT (Stream).

  1. SELECT <* | expression [ AS field_alias ] [, ...]>
  2. FROM stream_name_1
  3. [ join_type JOIN stream_name_2
  4. WITHIN (some_interval)
  5. ON stream_name_1.field_1 = stream_name_2.field_2 ]
  6. [ WHERE search_condition ]
  7. [ GROUP BY field_name [, window_type] ]
  8. EMIT CHANGES;

INSERT

Insert a record into specified stream. See INSERT.

  1. INSERT INTO stream_name (field_name [, ...]) VALUES (field_value [, ...]);