源表(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
时间: 2024-09-28 16:06:20