建表
create table json_temp(
appkey string,
jsondata string
)
row format delimited
fields...导入数据
appkey001|{"count":2,"usage":91273,"pkg":"com.example.gotest"}
appkey001|{"count":234,"usage"...' overwrite into table json_temp;
3....查询数据
-- 使用 get_json_object 函数
select t.appkey, get_json_object(t.jsondata,'$.count'), get_json_object...json_temp t1 lateral view json_tuple(t1.jsondata,'count','usage') t2 as t2_count, t2_usage;
查出的来结果如下