insert overwrite table full_data_table select
ddd.data_col
from
( select aa.data_col from full_data_table aa
left join
( select b.pk_col as pk_id from full_data_table a
left join inc_data_table b on a.pk_col = b.pk_col
where b.pk_col is not null and b.date_col = current_date() ) bb
on aa.pk_col = bb.pk_id
where bb.pk_id is null
union all
select cc.data_col from inc_data_table cc
where cc.date_col= current_date() ) ddd ;
最后
以上就是精明音响最近收集整理的关于Hive中实现数据增量累加主键覆盖的sql的全部内容,更多相关Hive中实现数据增量累加主键覆盖内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复