I have a table called 'employee' in SQL Server :
ID NAME ADDRESS DESIGNATION 1 Jack XXX Clerk 2 John YYY Engineer
I have created an external table (emp) in hive and through sqoop import I imported data from employee to hive table using --query argument of sqoop. If I mention --query as '
select * from employee' then data gets inserted to hive table correctly.But if I mention --query as '
select ID,NAME,DESIGNATION' from employee' then data in DESIGNATION column of 'employee' table(rdbms) is getting inserted to address column of 'emp' table instead of getting inserted to designation column.When I run the below hive query:
select designation from emp;
I get values as : NULL NULL instead of : Clerk Engineer But if I run the hive query as :
select address from emp;
I get values as : Clerk Engineer instead of :NULL NULL Any ideas of fixing this incorrect data would be of great help.I am currently using 0.11 version of hive so I can't use hive insert queries which are available from 0.14 hive version.