hive struct 插数据

RainySoul_ 2017-07-13 05:11:17
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;
...全文
1975 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

7,388

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 数据仓库
社区管理员
  • 数据仓库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧