eKuiper lexical elements

    Tokens

    eKuiper SQL is built up from tokens. There are four classes of tokens:

    • identifiers
    • keywords
    • operators

    White space formed from spaces, horizontal tabs, carriage returns, and newlines is ignored except as it separates tokens that would otherwise combine into a single token. While breaking the input into tokens, the next token is the longest sequence of characters that form a valid token.

    Identifiers name entities within a program. An identifier is a sequence of one or more letters and digits. An identifier must start with a letter.

    Keywords

    Reserved keywords for rule SQL: If you’d like to use the following keyword in rule SQL, you will have to use backtick to enclose them.

    The following is an example for using a stream named from, which is a reserved keyword in eKuiper.

    Reserved keywords for streams management: If you’d like to use the following keywords in stream management command, you will have to use backtick to enclose them.

    1. CREATE, RROP, EXPLAIN, DESCRIBE, SHOW, STREAM, STREAMS, WITH, BIGINT, FLOAT, STRING, DATETIME, BOOLEAN, ARRAY, STRUCT, DATASOURCE, KEY, FORMAT,CONF_KEY, TYPE, STRICT_VALIDATION, TIMESTAMP, TIMESTAMP_FORMAT

    Following operators are provided.

    Literals

    Boolean literals

    Example, SELECT TRUE AS field1 FROM demo , the field field1 always returns .

    1. DD, HH, MI, SS, MS