Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 846 Bytes

streams.md

File metadata and controls

47 lines (31 loc) · 846 Bytes

Stream Statements

SQL statements are defined to create and manage streams.

Create Stream

CREATE STREAM defines a stream that connects to an external system to load data stream.

CREATE STREAM   
    stream_name   
    ( column_name <data_type> [ ,...n ] )
    WITH ( property_name = expression [, ...] );

For the detail stream spec, please check stream.

Example:

CREATE STREAM my_stream ()
WITH ( datasource = "topic/temperature", FORMAT = "json", KEY = "id")

Describe Stream

A statement to get the stream definition.

DESCRIBE STREAM stream_name

Drop Stream

Delete a stream. Please make sure all the rules which refer to the stream are deleted.

DROP STREAM stream_name

Show Streams

Display all the streams defined.

SHOW STREAMS