赞
踩
1) 启动flink (1.10 版本)
sudo ./bin/start-cluster.sh
2) 启动 sql-client
sudo ./bin/sql-client.sh embedded
启动成功 会进入 flink sql> 命令行界面 ( 输入 quit; 退出)
- Flink SQL> SELECT name, COUNT(*) AS cnt
- FROM (VALUES ('Bob'), ('Alice'), ('Greg'), ('Bob')) AS nameTable(name)
- GROUP BY name;
3.1 增加扩展包(默认的只支持csv,file等文件系统)
- flink-json-1.10.2.jar (https://repo1.maven.org/maven2/org/apache/flink/flink-json/1.10.2/flink-json-1.10.2.jar)
-
- flink-sql-connector-kafka_2.11-1.10.2.jar (https://repo1.maven.org/maven2/org/apache/flink/flink-sql-connector-kafka_2.11/1
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。