Blog
flink-35 sql-client准备
启动flink集群
/data/flink-1.17.1/bin/yarn-session.sh -d
启动sql-client
/data/flink-1.17.1/bin/sql-client.sh embedded -s yarn-session
常用配置
- 结果显示模式
# 默认table,还可以设置tableau、changelog
SET sql-client.execution.result-mode=tableau;
执行环境
# 默认streaming 也可以设置batch
SET execution.runtime-mode=streaming;
设置并行度
SET parallelism.default=1;
设置状态TTL
SET table.exec.state.ttl=1000;
Flink SQL客户端初始化
conf/sql-client-init.sql
CREATE DATABASE mydatabase;
SET sql-client.execution.result-mode=tableau;
sql-client启动时指定初始化文件
bin/sql-client.sh embedded -s yarn-session -i conf/sql-client-init.sql