hive query with field is json

if field is json,when query one key from json ,it will help you .

 select  idfa, appid ,appname , countrycode ,  get_json_object( field, '$.carrier'  )    from   impression_hour  where   yr = $yr and mt = $mt and  dt=$dt and  countrycode = 'SG'";

 

refer :

https://docs.microsoft.com/zh-cn/azure/hdinsight/hdinsight-using-json-in-hive

posted on 2017-09-26 16:35  iokde.com  阅读(151)  评论(0编辑  收藏  举报

导航