hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sujesh Chirackkal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-3740) Insert into table with partition : overwriting the partition instead of appending records while running the hql script
Date Thu, 22 Nov 2012 10:18:58 GMT
Sujesh Chirackkal created HIVE-3740:
---------------------------------------

             Summary: Insert into table with partition : overwriting the partition instead
of appending records while running the hql script
                 Key: HIVE-3740
                 URL: https://issues.apache.org/jira/browse/HIVE-3740
             Project: Hive
          Issue Type: Bug
          Components: CLI
    Affects Versions: 0.8.1
            Reporter: Sujesh Chirackkal


insert into table with partition works well with CLI. But overwriting the partition when executed
through hql script.

Table Schema
(Table Name: jobs_status, partitioned on column job_name)
completed_time string
job_name string


hive script (status.hql) contains the below commands
use sample_db;
insert into table job_status 
partition(job_name='testJob')
select t.completionTime as completed_time from (select count(1) as cnt, from_unixtime(unix_timestamp())
as completionTime)t;

The above commands when executed through CLI works well and append new records into the partition.
But when executing the script as hive -f status.hql, it overwrites the existing records from
the partition and insert only the new record.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message