hive中insert出现values__tmp__table__x表

刚开始学习hive,在hive2.1.1中,(要么这是一个bug?要么,hive底层在实现用insert语法插入数据时先是创建临时表(只放于缓存中,不在hdfs上),再把数据复制到目标表)
hive default> insert into test1(id,name,deptno) values(1,‘testname1’,‘1’);
hive> insert into test1(id,name,deptno) values(2,‘testname2’,‘2’);
hive> insert into test1(id,name,deptno) values(3,‘testname3’,‘3’);
hive> insert into test1(id,name,deptno) values(4,‘testname4’,‘4’);
hive> insert into test1(id,name,deptno) values(5,‘testname5’,‘5’);
hive> show tables;
OK
page_views
test1
values__tmp__table__1
values__tmp__table__2
values__tmp__table__3
values__tmp__table__4
values__tmp__table__5

重新启动hive,这些tmp表就没了
hive> exit;
root# hive

猜你喜欢

转载自blog.csdn.net/weixin_44388689/article/details/120701267