Hadoop版本:Hadoop2.6.4 Hbase版本:0.98.14-hadoop2 Hive版本:1.2.1 TMPDB.CEM_USER_TOUCH_VIEW Hive来源表 TMPDB.CEM_USER_QMH_20200521 Hive分区表 代码片段 insert into table TMPDB.CEM_USER_QMH_20200521
partition(month_part='202005',day_part='02')
select index_id, month_id, day_id,
user_id, device_number, channel_type,
biz_id, biz_name, biz_type, operat_date,
operat_time, val1,val2, val3, val4, val5
from CEM_USER_TOUCH_VIEW t where
month_part = '202005' and day_part='02' Hive分区表与Hbase整合,在Hive中创建一张外部分区表关联Hbase表,然后再向Hive分区表插入数据报错。 可能是Hive的一个BUG,加 limit 子句可以解决问题。 insert into table TMPDB.CEM_USER_QMH_20200521
partition(month_part='202005',day_part='02')
select index_id, month_id, day_id,
user_id, device_number, channel_type,
biz_id, biz_name, biz_type, operat_date,
operat_time, val1,val2, val3, val4, val5
from CEM_USER_TOUCH_VIEW t where
month_part = '202005' and day_part='02'
limit 2168841 插入成功 |