如何将嵌套的json加载到具有以下场景的两个记录的hive表中

时间:2016-04-01 06:34:53

标签: hadoop hive

请帮我看一下JSON的输出:

{ "value":["id":"orien""class":"8to9""properties": {"subscription": 1"year","unit": "appl",}},
{"id": "hyderabad","class": "9to10","properties":{"subscription": "2years","unit": "appl23", }}]}

如果我们写这样的选择查询:

select id, class, properties.subscription,properties.unit from table

输出应为

id           class    properties.subscription  properties.unit
orien        8to9     1year                   appl
Hyderabad    9to10    2year                   appl23

0 个答案:

没有答案