源表(table1)数据{A:string B:array<BIGINT> C:string}
A B C
190
[1030,1031,1032,1033,1190] select
id
191
[1030,1031,1032,1033,1190] select id
希望的结果是:
190 1030 select id
190 1031 select id
190 1032 select id
190 1033 select id
190 1190 select id
191 1030 select id
191 1031 select id
191 1032 select id
191 1033 select id
191 1190 select id
故使用select A,B,C from table_1 LATERAL VIEW explode(B) table1 as B
得到上述结果
hive行转多列LATERAL VIEW explode,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/judylucky/p/3713774.html