Updated on 2024-05-29 GMT+08:00

Verifying SQL Statements with the FlinkSQL Client

This section applies to MRS 3.3.0 or later.

Scenarios

You can verify SQL syntax during SQL job development on the SQL Client. Running SQL commands in verification mode does not start Flink jobs.

How to Use

  • Verifying SQL statements
    • When you run the SQL shell command, add -v or --validate to enter the verification mode.

      sql-client.sh -v

    • When you run the SQL shell command, you can run SET to enter or exit the verification mode.
      • Enter the verification mode: SET table.validate = true;
      • Exit the verification mode: SET table.validate = false;
  • Verifying SQL scripts

    When the -f parameter is used to specify a SQL script, you can add -v to enter the verification mode.

    sql-client.sh -f test.sql -v