Hive排序 cluster by column = distribute by column + sort by column
来源:互联网 发布:苹果内存清理软件 编辑:程序博客网 时间:2024/05/01 13:56
(1)对于order by,sort by:
我们可以使用limit进行限制返回的行数,从而实现抓出数据的top N的情形。
(2)对于distribute by:
sort by为每个reducer产生一个排序文件。在有些情况下,你需要控制某个特定行应该到哪个reducer,通常是为了进行后续的聚集操作。hive的distribute by就派上用场了:
select year, temperature
distribute by year
sort by year asc, temperature desc;
需要注意的是,hive要求distribute by 要写在sort by之前。
(3)对于cluster by:
简而言之:cluster by column = distribute by column + sort by column (注意,都是针对column列,且采用默认ASC)
即对于上面例子:
就等于:
当然这失去了按照气温排序的要求。
0 0
- Hive排序 cluster by column = distribute by column + sort by column
- hive Sort By/Order By/Cluster By/Distribute By
- hive中的order by+sort by+distribute by+cluster by
- Hive Sort by/Order By/Cluster By/Distribute By
- hive sort by,order by ,distribute by,cluster by
- Hive order by/sort by/distribute by/cluster by作用
- hive中的order by , sort by, distribute by, cluster by
- Hive中order by,sort by,distribute by,cluster by
- hive中order by,distribute by,sort by,cluster by
- Hadoop Hive 中的排序 Order by ,Sort by ,Distribute by, Cluster By,
- hive排序:distribute by 、sort by 、cluster by 、order by 区别
- Hive 区分cluster by、distribute by + sort by、order by以及创建表带有clustered by和sort by
- hive中order by,sort by,distribute by,Cluster By的区别
- hive中order by,sort by, distribute by, cluster by作用以及用法
- hive 中的Sort By、 Order By、Cluster By、Distribute By 区别<转>
- Hive中order by,sort by,distribute by,cluster by的区别
- hive中order by,sort by, distribute by, cluster by作用以及用法
- hive中order by,sort by, distribute by, cluster by作用以及用法
- java加解密之RSA使用
- iOS10 ATS / 非HTTPS被禁问题
- SELinux简介
- 图的深度遍历
- 机器新建用户检查
- Hive排序 cluster by column = distribute by column + sort by column
- 给Unity开发者的C#内存管理(第一部分) C# Memory Management for Unity Developers (part 1 of 3)
- c#学习笔记之Application.DoEvents应用
- android实现APP Linking
- CSS display:inline和float:left两者的区别
- ArcGis For JavaScript4.x学习(一)——第一个demo
- eclipse svn不显示提交人的问题
- IOS 导航栏上的基本控件
- android静默安装和卸载