首页 > 其他分享 >045.hive-hive解析json-json_tuple

045.hive-hive解析json-json_tuple

时间:2022-12-25 16:00:23浏览次数:43  
标签:string tuple hive json 045 解析 dt

get_json_object(string json_string, string path) 无法解析汉字 get_json_object('{"movie":"594","rate":"4","timeStamp":"978302268","uid":"1"}','$.movie');   json_tuple 可以解析汉字  

-- 解析{"冷热度":"正常冰","甜度":"标准风味"}
 select 
 a.attribute
 ,a.order_code 
 ,b.lengre
 ,b.tiandu
 from 
( select * from  dwd_biz_item_di 
     where     
      dt >=20221001 
     and 
     dt <=20221031  
    
)  a lateral view 
json_tuple(a.attribute,'冷热度','甜度' ) b 
as 
lengre
,tiandu
 ;

 

标签:string,tuple,hive,json,045,解析,dt
From: https://www.cnblogs.com/star521/p/17004128.html

相关文章