[英]Hive ParseException: cannot recognize input near 'create' 'table'
I am trying to conduct a hive query of the form我正在尝试对表单进行蜂巢查询
with (
select a,b from some_db.some_table
) as my_subquery
create table some_other_db.new_table as select * from my_subquery
And I am getting the error我收到了错误
cannot recognize input near 'create' 'table' 'some_other_db' in statement
How do I resolve?我该如何解决?
The issue is in hive you cannot include create
statements after a with
statement.问题出在配置单元中,您不能在with
语句之后包含create
语句。 They need to be before.他们需要在之前。
The following query worked:以下查询有效:
create table some_other_db.new_table as
with (
select a,b from some_db.some_table
) as my_subquery
select * from my_subquery
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.