Search code examples
apache-flinkflink-sql

How does the Flink SQL Client distinguish batch mode and stream mode?


As we all know, Flink has two core APIs (DataStream/DataSet), but when I use flink Sql Client to submit a job, I do not need to choose the stream or batch mode.So how Flink SQL Client decide to use batch mode and stream mode. I did not find the answer in the Official document. So, I would like to know how Flink SQL Client to distinguish batch mode and stream mode?


Solution

  • When you start Flink's SQL client you can specify the environment to be used via

    sql-client.sh embedded -d <default environment file> -e <session environment file>
    

    An environment file is a YAML file describing the catalog and table execution environment, including whether to use batch or streaming:

    execution:
      type: streaming
    

    See the documentation for more details.