hadoop - Insert overwrite partition in Hive table - Values getting duplicated -
i created hive table non-partition table , using select query inserted data partitioned hive table.
- by following above link partition table contains duplicate values. below setps
this sample employee dataset:link1
i tried following queries: link2
but after updating value in hive table,
updating salary of steven employeeid 19 50000.
insert overwrite table unm_parti_trail partition (department = 'a') select employeeid,firstname,designation, case when employeeid=19 50000 else salary end salary unm_parti_trail;
the values getting duplicated.
7 nirmal tech 12000 7 nirmal tech 12000 b
nirmal placed in department a duplicated department b.
am doing wrong?
please suggest.
it seems forgot clause in last insert overwrite:
insert table unm_parti_trail partition (department = 'a') select employeeid,firstname,designation, case when employeeid=19 50000 else salary end salary unm_parti_trail department = 'a';
Comments
Post a Comment