hive 分桶表
来源:互联网 发布:股票下跌提醒软件 编辑:程序博客网 时间:2024/06/02 05:42
http://lib.csdn.net/article/hive/48463
#创建分桶表
create table stu_buck(sno int,sname string,sex string,sage int,sdept string)
clustered by(sno)
sorted by(sno DESC)
into 4 buckets
row format delimited
fields terminated by ',';
#设置变量,设置分桶为true, 设置reduce数量是分桶的数量个数
set hive.enforce.bucketing = true;
set mapreduce.job.reduces=4;
#开会往创建的分通表插入数据(插入数据需要是已分桶, 且排序的)
#可以使用distribute by(sno) sort by(sno asc) 或是排序和分桶的字段相同的时候使用Cluster by(字段)
#注意使用cluster by 就等同于分桶+排序(sort)
insert into table stu_buck
select sno,sname,sex,sage,sdept from student distribute by(sno) sort by(sno asc);
http://blog.csdn.net/wisgood/article/details/17186107
http://blog.csdn.net/epitomizelu/article/details/41911657
http://www.cnblogs.com/mumuxinfei/p/3820523.html
http://blog.csdn.net/lzm1340458776/article/details/43085423
- Hive 分桶表
- hive 分桶表
- Hive
- HIVE
- Hive
- hive
- hive
- hive
- hive
- hive
- Hive
- hive
- Hive
- hive
- Hive
- Hive
- hive
- Hive
- 开关电源EMI设计与整改策略!!!
- Mxnet(4)-fcn训练自己的数据
- JS 跨时区时间解决方案
- Python基础学习笔记之二
- 探索 Android Studio
- hive 分桶表
- Python Unittest 自动化单元测试框架Demo
- Android6.0之AMS如何启动app中篇之Task的管理
- cocos2d-x ui::Button 的setEnabled 和 setVisible 的区别,setEnabled后按钮却不见了
- JFreeChart样式设置
- visual studio和远程sql server数据库连接
- MTK lk源码解析8( lk 阶段exceptions.S 解析)
- xerces解析器的使用实例详解
- Html5,Java WebSocket简单实现