hive
SmellyKitty
这个作者很懒,什么都没留下…
展开
-
【hive】 rollup的空值过滤
rollup rollup 用于hive在group by的顺序分组聚合,举例如下: select mac, stat_date, avg(cast(cpuOccupancyRate as int)) cpu_avg from bidata.t_ods_pp_uplink_status_id where stat_date>=20220119 and stat_date<=20220119 group by rollup(mac,stat_date) 输出结果: ma原创 2022-01-24 13:37:56 · 1608 阅读 · 1 评论 -
【hive】hive常用命令与常用功能实践(持续更新)
常用命令 输出表头 set hive.cli.print.header=true; set hive.resultset.use.unique.column.names=false; 使用正则表达式 set hive.support.quoted.identifiers=none; 比如select时候想过滤某些列名,在列很多的时候很有用,通过以下实现: select a.`(stat_date)?+.+` from table_name原创 2021-11-03 10:57:55 · 795 阅读 · 0 评论