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.

refered site

  1. 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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -