Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Using sqoop import, How to append rows into existing hive table?

Using sqoop import, How to append rows into existing hive table?

Explorer

From sqlserver I imported and created a hive table using the below query.

 

sqoop import --connect 'jdbc:sqlserver://10.1.1.12;database=testdb' --username uname --password paswd --table demotable --hive-import --hive-table hivedb.demotable --create-hive-table --fields-terminated-by ','

 

Command was successful, imported the data and created a table with 10000 records.

I inserted 10 new records in sqlserver and tried to append these 10 records into existing hive table using --where clause

 

sqoop import --connect 'jdbc:sqlserver://10.1.1.12;database=testdb' --username uname --password paswd --table demotable --where "ID > 10000"

--hive-import -hive-table hivedb.demotable

 

But the sqoop job is getting failed with error

ERROR tool.ImportTool: Error during import: Import job failed!

 

Is any other alternatives to insert into table using sqoop.

Don't have an account?
Coming from Hortonworks? Activate your account here