背景
将sql写入文件中,可以写入多条sql,支持写入set、create、insert。然后程序读取文件提交运行程序。
Flink版本
1.11.2
代码
1 | import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; |
1 | public class CliOptions { |
1 | import org.apache.commons.cli.*; |
1 | import java.util.ArrayList; |
Reference
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/create.html
http://wuchong.me/blog/2019/09/02/flink-sql-1-9-read-from-kafka-write-into-mysql/