建表
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"...:9876,"pkg":"com.example.gotest"}
appkey001|{"count":34,"usage":5432,"pkg":"com.example.msg"}
load...查询数据
-- 使用 get_json_object 函数
select t.appkey, get_json_object(t.jsondata,'$.count'), get_json_object...2 91273
appkey001 234 9876
appkey001 34 5432