hive 操作(四)
来源:互联网 发布:网络变压器信号定义 编辑:程序博客网 时间:2024/06/07 10:03
Hive 基础及安装
Hive 操作(一)
hive 操作(二)——使用 mysql 作为 hive 的metastore
hive 操作(三)——hive 的数据模型
hive 操作(四)
distinct:去重
视图
使用视图可以屏蔽复杂的操作;
还可进行权限的控制;
hive> create view v1 as select * from t1;
limit clause
Limit 限制查询的记录数,返回的结果是随机选择的,
hive> select * from t1 limit 5;
sort by & order by
sort by
多个 reduce,内部排序
order by
一个 reduce,总排序
Java 操作
Java API 操作之前,必须启动 hive 的远程服务,在 linux 中执行如下的命令:
[root@hadoop0 ~]# hive --service hiveserver >/dev/null 2>/dev/null &
在 hive 1.2 及以上的版本(不再支持 hive),如下更为简洁的命令:
[root@hadoop0 ~]# hiveserver2 &
内置函数 & UDF(User Defined Function)
hive> # 键入 tab 键会提示是否显示全部的函数信息hive> describe function substr; # 相当于 man 操作,输出函数使用信息hive> select sum(id) from t2;
0 0
- hive 操作(四)
- hive操作(四)
- Hadoop(四)Hive整合HBase及JDBC方式操作Hive
- Hive学习指南(四)
- Hive随谈(四):Hive QL
- Hive 随谈(四)– Hive QL
- Hive 随谈(四)– Hive QL
- Hive 随谈(四)– Hive QL
- Hive总结(四)hive安装记录
- Hive总结(四)hive安装记录
- Hive 实践(四)、Hive 语法归纳
- Hive总结(四)hive安装记录
- Hive 操作(一)
- Hue(四)集成Hive
- Hive总结(二)hive基本操作
- Hive总结(二)hive基本操作
- Hive总结(二)hive基本操作
- Hive总结(二)hive基本操作
- 递归调用
- 《大话数据结构》学习记录1--第1,2章和第3章的顺序线性表
- 从pid转换至task_struct
- open failed: EACCES (Permission denied)
- 数据库启动的三个台阶nomount,mount,open
- hive 操作(四)
- Hexo + Github Pages静态博客搭建简明教程
- C语言实现快速排序算法
- POJ 2449-Remmarguts' Date(A*+spfa)
- HDU 2489 Minimal Ratio Tree(dfs+最小生成树)
- ping命令整个过程详解
- 226. Invert Binary Tree
- Markdown基础语法
- 构造函数案例