[ 
https://issues.apache.org/jira/browse/FLINK-24153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timo Walther closed FLINK-24153.
--------------------------------
    Fix Version/s: 1.13.3
       Resolution: Fixed

Reverted in 1.13: c6863d184e0386ea69799a03f67dc218ae2a516c

> Unable to use SET command in Flink SQL Shell file submit mode
> -------------------------------------------------------------
>
>                 Key: FLINK-24153
>                 URL: https://issues.apache.org/jira/browse/FLINK-24153
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.13.1
>            Reporter: Nilanjan Sarkar
>            Assignee: Timo Walther
>            Priority: Major
>             Fix For: 1.13.3
>
>
> Let's say you created a Flink SQL job in a file called *sample.sql*
>  
> {code:java}
> -- Properties that change the fundamental execution behavior of a table 
> program.
> SET 'execution.runtime-mode' = 'streaming';
> SET 'sql-client.execution.result-mode' = 'tableau';
> SET 'sql-client.execution.max-table-result.rows' = '10000';
> SET 'parallelism.default' = '1';
> -- Source table
> CREATE TEMPORARY TABLE salesitems (
>     seller_id VARCHAR,
>     product VARCHAR,
>     quantity INT,
>     product_price DOUBLE,
>     sale_ts BIGINT,
>     proctime AS PROCTIME()
> ) WITH (
>     'connector' = 'kafka',
>     'topic' = 'salesitems',
>     'properties.bootstrap.servers' = '10.129.35.58:29092',
>     'properties.group.id' = 'sliding-windows',
>     'scan.startup.mode' = 'latest-offset',
>     'format' = 'json'
> );
> SELECT
>   seller_id,
>   HOP_START(proctime, INTERVAL '10' SECONDS, INTERVAL '30' SECONDS) AS 
> window_start,
>   HOP_END(proctime, INTERVAL '10' SECONDS, INTERVAL '30' SECONDS) AS 
> window_end,
>   SUM(quantity * product_price) AS window_sales
> FROM salesitems
> GROUP BY
>   HOP(proctime, INTERVAL '10' SECONDS, INTERVAL '30' SECONDS),
>   seller_id;
> {code}
> Now, if you submit the job as -
> {code:java}
> ${FLINK_HOME}/bin/sql-client.sh embedded \
> --jar ${FLINK_HOME}/lib/flink-sql-connector-kafka_2.11-1.13.1.jar \
> -f sample.sql{code}
> The error you get is -
> {code:java}
> [INFO] Executing SQL from file.
> Flink SQL> -- Properties that change the fundamental execution behavior of a 
> table program.
> SET 'execution.runtime-mode' = 'streaming';
> [ERROR] Could not execute SQL statement. Reason:
> org.apache.flink.sql.parser.impl.ParseException: Encountered 
> "\'execution.runtime-mode\'" at line 2, column 5.
> Was expecting one of:
> <BRACKET_QUOTED_IDENTIFIER> ...
> <QUOTED_IDENTIFIER> ...
> <BACK_QUOTED_IDENTIFIER> ...
> <HYPHENATED_IDENTIFIER> ...
> <IDENTIFIER> ...
> <UNICODE_QUOTED_IDENTIFIER> ...
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to