Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
0.8.1
-
None
-
None
Description
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.