hive json 查询
hivejson查询
selectcount(1),get_json_object(datainfo,'$.dataInfo.domainFlag')fromt_origin_ugc_stat_onlinewheredatecol='2015-05-28'andappid=1000andcategory='user.reg'groupbyget_json_object(datainfo,'$.dataInfo.domainFlag');
/opt/hive-0.9.0/bin/hive-e"useent;selectdistinctysuidfromt_origin_web_type_access_stat_onlinewheredatecolbetween'2015-05-21'and'2015-06-02'orderbyysuid">20150602ysuid_uv.txt
/opt/hive-0.9.0/bin/hive-e"useent;selectdistinctget_json_object(datainfo,'$.dataInfo.ysuid')asysuidfromt_origin_ugc_union_onlinewheredatecolbetween'2015-05-21'and'2015-06-02'andcategory='ugc.consume'andugcType='t_accountrecord'">20150602ysuid_con.txt
/opt/hive-0.9.0/bin/hive-e"useent;selectdistinctget_json_object(datainfo,'$.dataInfo.ysuid')asysuidfromt_origin_ugc_union_onlinewheredatecolbetween'2015-05-21'and'2015-06-02'andcategory='user.reg'andugcType='t_user'">20150602ysuid_reg.txt