
hive
开快车的小吕
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
rank()函数使用
-- 每人的前三次最高消费select *, rank() over (partition by name order by cost desc ) rkfrom business;select *from ( select *, rank() over (partition by name order by cost desc ) rk from business )t1where rk<=3;...原创 2021-04-27 10:10:59 · 320 阅读 · 0 评论 -
Hive常用函数
常用日期函数unix_timestamp:返回当前或指定时间的时间戳 select unix_timestamp();select unix_timestamp("2020-10-28",'yyyy-MM-dd');from_unixtime:将时间戳转为日期格式select from_unixtime(1603843200);current_date:当前日期select current_date;current_timestamp:当前的日期加时间select current_t原创 2021-04-27 10:09:12 · 177 阅读 · 0 评论 -
Hive中窗口函数的使用
-- hive中sql执行顺序 -- 1.from -- 2.join on 或 lateral view explode() t_tmp as c_tmp -- 3.where -- 4.group by -- 5.聚合函数 如sum() count(*) -- 6.having -- 7.select 中若包含over()开窗函数,执行完非开窗函数后select等待执行完开窗函数, -- 然后执行select完,开窗函数通过表数据进行分区和排序,跟select查询中的字段是原创 2021-04-27 09:47:57 · 656 阅读 · 1 评论 -
User: xxx is not allowed to impersonate xxx 解决方案
<!-- beeline -u jdbc:hive2://hadoop102:10000 -n lv lv为超级代理,代理上层进行hadoop的操作 User: lv is not allowed to impersonate lv (state=,code=0)出错解决方案--><property> <name>hadoop.proxyuser.lv.hosts</name> <value>*</va原创 2021-04-23 20:58:27 · 3427 阅读 · 0 评论 -
MySql初始化问题
[lv@hadoop102 conf]$ schematool -initSchema -dbType mysql -verboseException in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.原创 2021-04-23 17:03:00 · 462 阅读 · 1 评论