将hive数组<string>输出解析为json格式或类似的内容

时间:2016-05-19 14:18:15

标签: hive

我有一个包含3列的HIVE表,col3是数组,表中的输出就像这样

select col1, col2, col3 from testing;
col1     col2   col3
xyx      123    ["xyz","Good investing","123","abc","Bad investing","006","port123","future investing","008","flaf4","good research investing","01"]
xyx      789    ["xyz","Good investing","789","flag1","Bad investing","006","port123","future investing","008"]

我想解析col3,以便输出如下

xyx      123    "xyz","Good investing","123"
xyx      123    "abc","Bad investing","006","port123"
xyx      123    "future investing","008","flaf4"
xyx      123    "good research investing","01"
xyx      789    "xyz","Good investing","789",
xyx      789    "flag1","Bad investing","006",
xyx      789    "port123","future investing","008"

任何帮助都将受到高度赞赏 -kb

0 个答案:

没有答案