前言
flink count iceberg表,查不出结果,问题记录
一.flink count iceberg,无结果问题
对于分区表:
数据是通过flink生成,但无法count(*)计算条数,切换execution.type为streaming、batch分别测试,都无效。
SET execution.type = streaming
-- Execute the flink job in batch mode for current session context
SET execution.type = batch
1
2
3
4
select count(*) from behavior_with_date_log_ib where dt='20220205';
1
二. 解决思路(菜鸟解决法)
flink没用,就改hive(当时没有安装spark),发现hive报各种错,拉到,换spark。
spark很强大:直接把结果算回来
spark-sql (default)> select count(*) from behavior_with_date_log_ib where dt='20220205';
22/02/15 20:33:14 WARN conf.HiveConf: HiveConf of name hive.metastore.event.db.notification.api.auth does not exist
count(1)
3622423
Time taken: 6.173 seconds, Fetched 1 row(s)
1
2
3
4
5
总结
flink count小表,几条数据的表,能count出来。什么原因? 先记录问题,看看1个月后的自己能否解决。
内容来源于网络,如侵删。
扫码下载《数据治理行业实践白皮书》,下载地址:https://fs80.cn/4w2atu
想了解或咨询更多有关袋鼠云大数据产品、行业解决方案、客户案例的朋友,浏览袋鼠云官网:https://www.dtstack.com/?src=bbs
同时,欢迎对大数据开源项目有兴趣的同学加入「袋鼠云开源框架钉钉技术群」,交流最新开源技术信息,群号码:30537511,项目地址:https://github.com/DTStack