Hive-笔记
文章平均质量分 56
u010453150
这个作者很懒,什么都没留下…
展开
-
Hive 日期格式转换笔记
Hive 获取当前时间: select from_unixtime(unix_timestamp(),’yyyy-MM-dd HH:mm:ss’);重点内容Hive中 日期格式转化办法: 2014-11-10 和 20141110相互转化的办法: 1.from_unixtime && unix_timestamp – 20141110 select from_unixtime(unix_t转载 2016-12-29 16:48:05 · 1038 阅读 · 0 评论 -
Hive HDF java 开发
环境 JDK版本:jdk1.7.0_67 IED: eclipse包 hadoop-core-1.2.1.jar hive-exec-2.1.1.jar hive-cli-2.1.1.jar hive-jdbc-2.1.1.jarUDF develop coding 在引入相关包后,需要继承UDF类。 最后返回的结果是一个 Text类型。//求两个时间之前的时间差,返回值以小时原创 2017-01-16 15:31:36 · 592 阅读 · 0 评论 -
Hive 常用方法
1.字符串长度函数:length语法: length(string A)返回值: int说明:返回字符串A的长度举例:hive> select length(‘abcedfg’) from lxw_dual;7 2. 字符串反转函数:reverse语法: reverse(string A)返回值: string说明:返回字符串A的反转结果举例:hive> select reverse(abcedf转载 2017-01-23 10:28:58 · 1963 阅读 · 0 评论