hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: Insert into hive table without overwriting data
Date Thu, 09 Oct 2014 03:52:15 GMT
Another way to do this is create a non-required partition.

Create table y() partitioned by (datestamp string);
insert into y (datestamp=201410100501) select * from X;

On Wed, Oct 8, 2014 at 11:45 PM, Devopam Mittra <devopam@gmail.com> wrote:

> the query should not really overwrite the data. can you please check your
> hive version and also validate that your table(s) don't have dynamic
> partitioning scheme... or that you are not firing a truncate before
> inserting the data.
>
> i assume you have done the data validation already (i.e. ensuring that
> actually data is getting overwritten, and not really replicating)
>
> regards
> Dev
>
> On Wed, Oct 8, 2014 at 8:21 PM, Thiago Henrique dos Santos Bento <
> thiago.bento@b2wdigital.com> wrote:
>
>>  Hi,
>>
>>
>>
>> When I insert data into a hive table like:
>>
>> Insert into hive_table
>>
>> Select columns
>>
>> From another_hive_table
>>
>>
>>
>> This query overwrite existing data. Any idea how to insert data without
>> overwriting data?
>>
>>
>>
>> *Thiago Henrique S. Bento*
>>
>> B2W Digital / B2W Labs | BIT SP
>>
>> thiago.bento@b2wdigital.com
>>
>> Tel.: +55 (11) 3454-3024
>>
>>
>> .............................................................................................................................................................
>>
>> *B**2**W DIGITAL*  #Americanas.com <http://americanas.com/>  #
>> Shoptime.com <http://shoptime.com/>  #Submarino.com
>> <http://submarino.com/>  #SouBarato.com <http://soubarato.com/>
>>
>>
>>
>>
>>  ------------------------------
>>
>> Esta mensagem pode conter informações confidenciais e somente o indivíduo
>> ou entidade a quem foi destinada pode utilizá-la. A transmissão incorreta
>> da mensagem não acarreta a perda de sua confidencialidade. Caso esta
>> mensagem tenha sido recebida por engano, solicitamos que o fato seja
>> comunicado ao remetente e que a mensagem seja eliminada de seu sistema
>> imediatamente. É vedado a qualquer pessoa que não seja o destinatário usar,
>> revelar, distribuir ou copiar qualquer parte desta mensagem. Ambiente de
>> comunicação sujeito a monitoramento.
>>
>> This message may include confidential information and only the intended
>> addresses have the right to use it as is, or any part of it. A wrong
>> transmission does not break its confidentiality. If you've received it
>> because of a mistake or erroneous transmission, please notify the sender
>> and delete it from your system immediately. This communication environment
>> is controlled and monitored.
>>
>> B2W Digital
>>
>>
>>
>
>
>
> --
> Devopam Mittra
> Life and Relations are not binary
>

Mime
View raw message