Hive 2.3.3 是默认支持insert overwrite、insert into的,不需要修改配置文件

在Hive 2.3.3版本中使用insert overwrite、insert into可以实现向表中插入数据的功能,并且不需要修改配置文件,是默认支持的。看我写的hql:

insert overwrite table subscribe_log_info (
(select t1.userid,t1.newfan,t1.clfan,t1.clefan,t1.allfan+t2.allfan from cleaned_subscribe_log_info_bak t1,t_news_fan_analysis_day t2 where t1.userid = t2.userid)
union all
(select t1.* from cleaned_subscribe_log_info_bak t1 left outer join t_news_fan_analysis_day t2 on t1.userid = t2.userid where t2.userid is null));

insert into table subscribe_log_info
select t1.userid,t1.allfan+t2.allfan from subscribe_log_info t1,t_news_fan_analysis_day t2 where t1.userid = t2.userid;

你可能感兴趣的:(hive,hive,insert,overwrite,insert,into,联表查询)