![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hive sql
伯爵er
这个作者很懒,什么都没留下…
展开
-
hive时间相减转分钟
hive时间相减转分钟原创 2022-08-15 21:23:29 · 1580 阅读 · 0 评论 -
hive中get_json_object获取多个字典中同一个key的value
获取多个字典中同一个key的value原创 2022-07-28 20:06:54 · 1302 阅读 · 0 评论 -
转译MongoDB读取的特殊字段
从MongoDB采集的表单到hive会出现字段不能读取的情况。因为MongoDB中定义的某些字段是hive中默认的关键字。解决方案:---在字段上加``即可,即:select `字段` from table; ---如果在shell脚本中跑别忘记加\select \`字段\` from table; ...原创 2021-10-11 17:47:33 · 105 阅读 · 0 评论 -
使用xshell 从hive中导出数据到文件
--从hive中导出数据到文件hive -e"select * from 表名;"|grep -v "WARN" >result.txt;hive -e"load data local inpath "result.csv" into table 表名字;"原创 2021-09-25 15:52:03 · 291 阅读 · 0 评论 -
hive开窗函数partition by
创建表单:CREATE TABLE hive.tmp.tmp_lc_test_0722 ( name varchar, class integer, s integer )插入数据:insert into tmp.tmp_lc_test_0722 values('a3',1,95)name class sa9 3 55a10 3 78a1 2 74a2 1 95a4 1 80a5 2 92a6 3 99a7 3 99a8 3 45a3 1 95rank():select *原创 2021-07-22 22:27:20 · 493 阅读 · 1 评论