You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Abhishek <ab...@gmail.com> on 2012/07/04 04:19:32 UTC

Hive insert into

Hi all,

Will hive support INSERT INTO ? and It is nothing but, appending new data to the existing data.Can any one please tell me how does it happen and which version of hive supports this?

Regards
Abhi



Sent from my iPhone

Re: Hive insert into

Posted by Mark Grover <mg...@oanda.com>.
Abhi,
Bejoy is right. To add to the remark, "insert into" doesn't work on bucketed tables as of now. For non-bucketed tables, it should work if you are using Hive version 0.8 or higher.

More details on this thread:
http://mail-archives.apache.org/mod_mbox/hive-user/201206.mbox/%3C263112076.394989.1338524796872.JavaMail.root@sms-zimbra-message-store-03.sms.scalar.ca%3E

If your create table statement contained "CLUSTERED BY" clause, then your table is bucketed; otherwise it's not.

Mark

----- Original Message -----
From: "Bejoy KS" <be...@yahoo.com>
To: user@hive.apache.org
Sent: Wednesday, July 4, 2012 1:35:48 AM
Subject: Re: Hive insert into

Hi Abhi

When you say INSERT INTO in hive it needn't be a file append. In hive the data corresponding to a table/partition is in a directory, data is stored as one or more files within those.

AFAIK when you do insert into, a new file is created in the directory along with old files. So hdfs file append needn't come to picture here.


Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: abhiTowson cal <ab...@gmail.com>
Date: Wed, 4 Jul 2012 00:40:03 
To: <us...@hive.apache.org>
Reply-To: user@hive.apache.org
Subject: Re: Hive insert into

hi youngwoo

Thanks for your reply.Can you justify your answer hdfs doesnot support
append, so how hive does it?

Regards
Abhi



On Tue, Jul 3, 2012 at 11:56 PM, 김영우 <wa...@gmail.com> wrote:
> Abhi,
>
> Hive supports INSERT INTO syntax but you should use Hive 0.8 or higher. See
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries
>
> - Youngwoo
>
> On Wed, Jul 4, 2012 at 11:19 AM, Abhishek <ab...@gmail.com> wrote:
>>
>> Hi all,
>>
>> Will hive support INSERT INTO ? and It is nothing but, appending new data
>> to the existing data.Can any one please tell me how does it happen and which
>> version of hive supports this?
>>
>> Regards
>> Abhi
>>
>>
>>
>> Sent from my iPhone
>
>

Re: Hive insert into

Posted by Bejoy KS <be...@yahoo.com>.
Hi Abhi

When you say INSERT INTO in hive it needn't be a file append. In hive the data corresponding to a table/partition is in a directory, data is stored as one or more files within those.

AFAIK when you do insert into, a new file is created in the directory along with old files. So hdfs file append needn't come to picture here.


Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: abhiTowson cal <ab...@gmail.com>
Date: Wed, 4 Jul 2012 00:40:03 
To: <us...@hive.apache.org>
Reply-To: user@hive.apache.org
Subject: Re: Hive insert into

hi youngwoo

Thanks for your reply.Can you justify your answer hdfs doesnot support
append, so how hive does it?

Regards
Abhi



On Tue, Jul 3, 2012 at 11:56 PM, 김영우 <wa...@gmail.com> wrote:
> Abhi,
>
> Hive supports INSERT INTO syntax but you should use Hive 0.8 or higher. See
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries
>
> - Youngwoo
>
> On Wed, Jul 4, 2012 at 11:19 AM, Abhishek <ab...@gmail.com> wrote:
>>
>> Hi all,
>>
>> Will hive support INSERT INTO ? and It is nothing but, appending new data
>> to the existing data.Can any one please tell me how does it happen and which
>> version of hive supports this?
>>
>> Regards
>> Abhi
>>
>>
>>
>> Sent from my iPhone
>
>

Re: Hive insert into

Posted by abhiTowson cal <ab...@gmail.com>.
hi youngwoo

Thanks for your reply.Can you justify your answer hdfs doesnot support
append, so how hive does it?

Regards
Abhi



On Tue, Jul 3, 2012 at 11:56 PM, 김영우 <wa...@gmail.com> wrote:
> Abhi,
>
> Hive supports INSERT INTO syntax but you should use Hive 0.8 or higher. See
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries
>
> - Youngwoo
>
> On Wed, Jul 4, 2012 at 11:19 AM, Abhishek <ab...@gmail.com> wrote:
>>
>> Hi all,
>>
>> Will hive support INSERT INTO ? and It is nothing but, appending new data
>> to the existing data.Can any one please tell me how does it happen and which
>> version of hive supports this?
>>
>> Regards
>> Abhi
>>
>>
>>
>> Sent from my iPhone
>
>

Re: Hive insert into

Posted by 김영우 <wa...@gmail.com>.
Abhi,

Hive supports INSERT INTO syntax but you should use Hive 0.8 or higher. See
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries

- Youngwoo

On Wed, Jul 4, 2012 at 11:19 AM, Abhishek <ab...@gmail.com> wrote:

> Hi all,
>
> Will hive support INSERT INTO ? and It is nothing but, appending new data
> to the existing data.Can any one please tell me how does it happen and
> which version of hive supports this?
>
> Regards
> Abhi
>
>
>
> Sent from my iPhone