hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj hadoop <raj.had...@gmail.com>
Subject Re: Merge records in hive
Date Thu, 06 Mar 2014 05:50:07 GMT
Thanks a lot Sunjay,

Any more thoughts on this,

Im okie with if any alternative for Merge concept in Hive


On Thu, Mar 6, 2014 at 2:02 AM, Subramanian, Sanjay (HQP) <
sanjay.subramanian@roberthalf.com> wrote:

>  Hey Raj
>
>  Maybe I am misunderstanding the question but u don't really have to do
> anything fancy to merge
>
>  ONE TIME
> ========
> CREATE EXTERNAL TABLE employee (
>      empno    BIGINT,
>      ename     STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' ;
>
>  ALTER TABLE employee SET LOCATION
> 'hdfs://path/to/dir/on/hdfs/containing/files'
>
>  Or if u r using AMAZON EMR :
> ALTER TABLE employee SET LOCATION
> 's3://bucketname/path/to/subfolder/containing/files'
>
>  Now if u keep putting files into this HDFS dir
>  'hdfs://path/to/dir/on/hdfs/containing/files'
> U should not have to do anything
>
>  Thanks
>
> Warm Regards
>
>
>  Sanjay
>
> linkedin:http://www.linkedin.com/in/subramaniansanjay
>
>   From: Raj hadoop <raj.hadoop@gmail.com>
> Reply-To: "user@hive.apache.org" <user@hive.apache.org>
> Date: Wednesday, March 5, 2014 at 4:16 AM
> To: "user@hive.apache.org" <user@hive.apache.org>
> Subject: Merge records in hive
>
>   Hi,
>
>
>
> Help required to merge data in hive,
>
>
>
> Ex:
>
> Today file
>
> -------------
>
> Empno  ename
>
> 1              abc
>
> 2              def
>
> 3              ghi
>
>
>
> Tomorrow file
>
> -----------------
>
> Empno  ename
>
> 5              abcd
>
> 6              defg
>
> 7              ghij
>
>
>
>
>
> Reg: should not drop the hive table and then create it,what I actually
> require is as shown in the example we have to merge the data,
>
>
>
> Thanks,
>
> Raj
>

Mime
View raw message