# 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 [, ...] );
1
2
3
4

For the detail stream spec, please check stream.

Example:

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

# Describe Stream

A statement to get the stream definition.

DESCRIBE STREAM stream_name
1

# Drop Stream

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

DROP STREAM stream_name
1

# Show Streams

Display all the streams defined.

SHOW STREAMS
1