语法
1.把collect的数组转为string类型
concat_ws(',', collect_set(cast(a.live_uid as STRING )))
2.HIVE中select除了某些字段之外的剩余所有字段
set hive.support.quoted.identifiers=none
select `(dt|hr)?+.+` from tb1
3.在 get_json_object 不可用的时候,取出对应字段的一种方式。公式写的有点问题,不过可以作为一种思路MySQL可以用
select
substr(data,locate('allowtm":',data)+length('allowtm":')#取出value值的起始位置
,locate(',"sendtm"',data)#取出value值的结束位置
-(locate('allowtm":',data)+length('allowtm":'))#减去value值的起始位置,得到value值字符长度
)
思路
1.查看一份数据的概览
select count(1),min(ds),max(ds) from dw.dwd_auction_visittm_di
网友评论