I've been trying to SOURCE a file with SQL statements in the Flink sql-client. From the docs:
SOURCE Reads a SQL SELECT query from a file and executes it on the Flink cluster.
This uses the Docker images for Flink version 1.13.1, Scala 2.11. Everything else about this Flink distribution works fine, as far as I can tell.
Within the container:
/opt/flink# echo "select 'hello';" > test.sql
/opt/flink# sql-client.sh
Then within the sql-client:
Flink SQL> select 'hello';
-- works as intended
[INFO] Result retrieval cancelled.
Flink SQL> source test.sql;
[ERROR] Could not execute SQL statement. Reason:
org.apache.calcite.runtime.CalciteException: Non-query expression encountered in illegal context
I'm sure it's a very obvious mistake. What am I missing?