Please note:
LOAD DATA LOCAL assumes the data in the given local path (maybe /tmp/data) and copy the data into hive's warehouse-dir
LOAD DATA /path moves the date from an given path in HDFS into hive's warehouse-dir
When you want to append data into an table you have to use partitioning.
best,
Alex
--
Alexander Lorenz
http://mapredit.blogspot.comOn Jan 18, 2012, at 7:37 AM, Krishnan Krishnamoorthy wrote:
> Hi Aniket/Bhavesh,
>
> Actually load data inpath is used for appending file and the path refers to the HDFS path.
> We can use load data local inpath in case the input file to be loaded is not in HDFS but it is present in the local system.
>
> Both of these append the data. In case, you need to overwrite the data, use
> load data inpath ‘/foo/write/bar.txt’ OVERWRITE into table tblname;
> OR
> load data local inpath ‘/foo/write/bar.txt’ OVERWRITE into table tblname; (in case the input file to be loaded is not in HDFS but it is present in the local system)
>
> Regards,
> Krishnan
>
> From: Aniket Mokashi [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 18, 2012 10:56 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Related to INSERT QUERY in Hive
>
> how about Load data inpath?
>
> On Tue, Jan 17, 2012 at 9:00 PM, Bhavesh Shah <[EMAIL PROTECTED]> wrote:
> Hello,
> I am using Hive-0.7.1. I want to append the data in table.
> Is hive-0.7.1 support appending feature or just support OVERWRITE feature?
> When I tried for the appending, the query is not working.
>
> What should I do in such case so that I append the data in table?
>
> --
> Thanks and Regards,
> Bhavesh Shah
>
>
>
>
> --
> "...:::Aniket:::... Quetzalco@tl"
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
> every reasonable precaution to minimize this risk, but is not liable for any damage
> you may sustain as a result of any virus in this e-mail. You should carry out your
> own virus checks before opening the e-mail or attachment. Infosys reserves the
> right to monitor and review the content of all messages sent to or from this e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>