cast 强制类型转换
cast(info as BIGINT)
concat_ws 字符串的链接
concat_ws('-',year,month,day)
split 字符串的分割
split(info,',')
lateral view explode 字符串的延展
lateral view explode(split(param['info'],'\;')) snTable as split_info
unix_timestamp 日期转毫秒
(unix_timestamp(start_time)-unix_timestamp(end_time))/60 (分钟)
case
case when a>1 then 1 when a>=1 and a<2 then 2 else 3 end as tmp
from_unixtime 毫秒转日期
from_unixtime(1511022000,'yyyy-MM-dd HH:mm:ss')
select 未命名的列 _c0
select sum(
_c0) from table
得到行号 row_umber()
select name, row_umber() over() from stu_table;
展示一个表创建时候的信息
show create table student_talbe;
查看一个表的所有的字段名
show full columns from question
hive sql 笔记
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。