Streams management

    The command is used for creating a stream. For more detailed information of stream definition, please refer to streams.

    • Specify the stream definition in command line.

    Sample:

    1. stream my_stream created

    The command create a stream named my_stream.

    • Specify the stream definition in file. If the stream is complex, or the stream is already wrote in text files with well organized formats, you can just specify the stream definition through -f option.

    Sample:

    1. # bin/kuiper create stream -f /tmp/my_stream.txt

    Below is the contents of my_stream.txt.

    1. my_stream(id bigint, name string, score float)
    2. WITH ( datasource = "topic/temperature", FORMAT = "json", KEY = "id");

    Sample:

    1. # bin/kuiper show streams
    2. my_stream

    The command is used for print the detailed definition of stream.

    Sample:

    1. # bin/kuiper describe stream my_stream
    2. Fields
    3. --------------------------------------------------------------------------------
    4. id bigint
    5. name string
    6. FORMAT: json
    7. KEY: id
    8. DATASOURCE: topic/temperature

    The command is used for drop the stream definition.

    Sample:

    1. stream my_stream dropped
    1. query

    Sample:

    1. # bin/kuiper query
    2. kuiper >

    After typing query sub-command, it prompts kuiper >, then type SQLs (see for how to use eKuiper SQL) in the command prompt and press enter.

    The results will be print in the console.

    • Press CTRL + C to stop the query;