没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
hive3left join 数据缺失问题
参考文章:
https://zhuanlan.zhihu.com/p/565145161?utm_id=0 https://blog.csdn.n
et/qq_37714755/article/details/105438009
问题复现:
select a.*
from
(
select n.*
from dw.dwm_exhibition_base n
inner join
(select database_name, max(dt) as dt
from dw.dwm_exhibition_base
where database_name='fair'
group by database_name
) m on n.database_name = m.database_name and n.dt = m.dt
where n.exh_name='亚太洁净技术与设备展览会'
) a
left join
(select
database_name,exh_id,exh_name,actor_exh_time,concat(exh_id,'_',database_name,
'_',exh_name,'_',actor_exh_time) as exh_id_new,count(*) as actor_cnt
from (
select
database_name,exh_id,exh_name,substr(actor_exh_time,0,10) as
actor_exh_time,actor_id,actor_name
from dw.dwd_actor_exhibition
where exh_id is not null
and exh_name is not null
and actor_exh_time is not null
--and exh_name = '亚太洁净技术与设备展览会'
group by
database_name,exh_id,exh_name,substr(actor_exh_time,0,10),actor_id,actor_name
) t
group by
database_name,exh_id,exh_name,actor_exh_time,concat(exh_id,'_',database_name,
'_',exh_name,'_',actor_exh_time)
) t2 on a.exh_id=t2.exh_id_new
where t2.actor_cnt>0
上述sql使用tez引擎left join 出t2表数据为空。。。。
问题产生原因:
� 因为hive由2.1.1升级为3.1.3后后,之前创建的表和现在创建的表某些属性不同(
bucketing_version),hive3版本底层mr的缺陷,是由于 HIVE 2 与 HIVE 3 在 JOIN 操
资源评论
大数据侠客
- 粉丝: 707
- 资源: 76
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功