SQL quick reference

    CREATE VIEW

    Create a new view with the view name given. A view is a physical object like a stream and it is updated with time. An exception will be thrown if the view is already created. The name of a view can either be the same as a stream. See .

    Create a new connector for fetching data from or writing data to an external system with the connector name given. A connector can be either a source or a sink one. Note that source connector is not supported yet. When creating a connector, its type and its bound stream must be specified in the WITH clause. There can be other options such as database name, user name and password. There can be an optional IF NOT EXIST config to only create the given connector if it does not exist. See CREATE CONNECTOR.

    1. CREATE <SOURCE|SINK> CONNECTOR connector_name [IF NOT EXIST] WITH (connector_option [, ...]);

    One of the following states is assigned to the connectors:

    Please wait for it to finish setting up if the state of the connector is Creating or Created. You can restart an aborted or terminated connector (in the future). You may also abandon connectors by using

    1. DROP connector_name;

    SELECT (from streams)

    1. FROM stream_name_1
    2. [ join_type JOIN stream_name_2
    3. WITHIN (some_interval)
    4. [ WHERE search_condition ]
    5. [ GROUP BY field_name [, window_type] ]

    Get a record from the specified view. The fields to get have to be already in the view. It produces one or zero static records and costs little time. See Select (View).

    INSERT

    Insert data into the specified stream. It can be a data record, a JSON value or binary data. See INSERT.

    1. INSERT INTO stream_name (field_name [, ...]) VALUES (field_value [, ...]);
    2. INSERT INTO stream_name VALUES 'json_value';
    3. INSERT INTO stream_name VALUES "binary_value";
    1. DROP CONNECTOR connector_name [IF EXISTS];

    SHOW

    Show the information of all streams, queries, views or connectors.