hive struct 插数据
create table student1(
studentid string,
address struct<state:string,city:string,county:string>
)
现在已有表 student2 里面有数据 student2里面的 省 市 区都是单独存在字段
表结构如下
student2(
studentid,
state,
city,
county
)
现在我想把student2的数据迁移到student1 里面去 怎么写插入语句呀?
insert overwrite table student1
select studentid,
struct() from student2;