You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Chen Song <ch...@yahoo.com> on 2012/01/20 16:47:41 UTC

question on hive multiple insert

Hi

I am reading on Hive's multiple insert syntax manual and wondering if it is possible to utilize join in any individual insert. e.g., 

FROM a
INSERT a.col1, a.col2 join b on a.col1 = b.col1
INSERT ...

Apparently, Hive doesn't like this query and give syntax error.

In other words, my question in general is, for multiple insert, can we specify multiple tables as data sources (of course, can benefit from one pass scan on only one table), or only one table from which the data can be pulled from?

Best,
Chen

Re: question on hive multiple insert

Posted by Chen Song <ch...@yahoo.com>.
Please disregard my previous email. I figured out that the correct syntax should be

FROM a JOIN b on a.col1 = b.col1
INSERT a.col1, a.col2
INSERT ...

Thanks
Chen


________________________________
 From: Chen Song <ch...@yahoo.com>
To: hive user list <us...@hive.apache.org> 
Sent: Friday, January 20, 2012 10:47 AM
Subject: question on hive multiple insert
 

Hi

I am reading on Hive's multiple insert syntax manual and wondering if it is possible to utilize join in any individual insert. e.g., 

FROM a
INSERT a.col1, a.col2 join b on a.col1 = b.col1
INSERT ...

Apparently, Hive doesn't like this query and give syntax error.

In other words, my question in general is, for multiple insert, can we specify multiple tables as data sources (of course, can benefit from one pass scan on only one table), or only one table from which the data can be pulled from?

Best,
Chen