简体   繁体   English

create table as select Join语句在hive中不起作用

[英]create table as select Join statement not working in hive

With the command: 使用命令:

hive -e "create table C as 
         (select * from A a 
         left join T t on a.seller_id = t.seller_id 
         where day=31 and month=1 and year=31)"

I get the following error: 我收到以下错误:

cannot recognize input near 'left' 'join' 'T' in join type specifier 无法识别连接类型说明符中'left''join''T'附近的输入

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SubQueries https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SubQueries

Hive supports subqueries only in the FROM clause. Hive仅在FROM子句中支持子查询。

Maybe: 也许:

create table C as select * from (select * from A a left join T t on a.seller_id = t.seller_id where day =31 and month = 1 and year = 31 )x"

它只是shuold被留下连接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM