首页 > 其他 > 详细

hive分区表

时间:2018-06-24 16:49:57      阅读:174      评论:0      收藏:0      [点我收藏+]

技术分享图片

技术分享图片

分区表创建

技术分享图片

技术分享图片

row format delimited fields terminated by ‘,‘;指明以逗号作为分隔符

 技术分享图片

依靠插入表创建分区表  从表sample_table选择 满足分区条件的 列插入到分区表中

insert into table partition_table partition(gender=‘M‘) select id,name from sample_table where gender=‘M‘;
insert into table partition_table partition(gender=‘F‘) select id,name from sample_table where gender=‘F‘;

explain可以查看执行计划

$ explain select *from sample_table where gender = ‘M‘;

$ explain select *from partition_table where gender = ‘M‘;

hive分区表

原文:https://www.cnblogs.com/ggzhangxiaochao/p/9220775.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!