hive-json-serde
hive的数组解析json中的数组,Map解析json中的对象:{“ pluginList”:[{“ name”:“ 1”,“ browser”:“ 1”,“ on”:“ 2”},{“ name“:” 1“,” browser“:” 3“,” on“:” 2“}]}创建表sql:创建表test_json(pluginlist Array <Map>>)ROW FORMAT SERDE'org。 apache.hadoop.hive.contrib.serde2.JsonSerde'WITH SERDEPROPERTIES(“ pluginlist” =“ $。pluginList”)
选择sql:从src_b5t_level2plugininfo限制10中选择pluginlist [0],pluginlist [0] ['
评论0
最新资源