魂落忘川犹在川 2022-05-11 17:21 采纳率: 50%
浏览 36
已结题

hive 一个表同时插入多个表

这样写是可以运行的

from  table_all 
insert overwrite table table_1
select first where first=1
insert overwrite table table_2
select first where first=2

下面这种写法为什么不行, 应该怎么写

from  table_all 
create table table_1 as
select first where first=1
create table table_2 as
select first where first=2

会报错

Error: Error while compiling statement: FAILED: ParseException line 2:0 cannot recognize input near 'create' 'table'
  • 写回答

2条回答 默认 最新

  • 魂落忘川犹在川 2022-06-10 10:45
    关注

    目前是不行的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 6月10日
  • 已采纳回答 6月10日
  • 修改了问题 5月11日
  • 创建了问题 5月11日