Documentation

Home > Documentation > CREATE INPUT STREAM Statement

CREATE INPUT STREAM Statement

Syntax

CREATE INPUT STREAM stream_identifier (
  field_identifier field_type[, ...]
);

Substitutable Fields

stream_identifier:

A unique identifier (name) for the input stream.

field_identifier:

The unique identifier (name) for a field in the schema associated with the stream.

field_type:
    int
  | double
  | bool
  | timestamp
  | string(length)

The data type contained in a specified field.

Discussion

In StreamSQL, the CREATE INPUT STREAM statement is used to define an Input Stream. The types and order of fields contained in the incoming tuples must be included in the stream declaration. Each field declaration contains an identifier and type entry and multiple field entries are separated by commas. You must include the tuple fields as arguments to the CREATE INPUT STREAM statement; the statement CREATE INPUT STREAM () will result in a runtime error.

StreamSQL supports the following data types: int, string, double, bool, and timestamp. With a string type, the maximum length must be specified.