Sqoop import: import failed error

0 votes

When I run this command:

sqoop import --connect jdbc:mysql://mysqldb.edu.cloudlab.com/retail_db --username labuser --password edureka --table customers --hbase-table hbaseimpo
rt111 --hbase-row-key customer_id --columns "customer_fname,customer_lname" --column-family cf1 --hbase-create-table -m 1;

I am getting import failed error.

Feb 11, 2019 in Big Data Hadoop by Likhita
967 views

1 answer to this question.

0 votes

The problem which you are facing is because of the schema of your MySql table. In your import command, you can select a subset of columns and control their ordering by using the --columns argument. This should include a comma-delimited list of columns to export. For example: --columns "col1,col2,col3". 

Note that columns that are not included in the --columns parameter need to have either defined default value or allow NULL values. Otherwise, your database will reject the imported data which in turn will make Sqoop job fail.

Please either use all the column names in the --columns tab of your Sqoop command as given in the below image or In MySql create a table with the proper schema where columns of your MySql table should allow null values.

Refer to the below screenshot where we have executed the Sqoop command successfully.

image

image

answered Feb 11, 2019 by Omkar
• 69,030 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Sqoop import failed while importing mysql table to Hbase

There is a spelling mistake in your ...READ MORE

answered Feb 6, 2019 in Big Data Hadoop by Omkar
• 69,030 points
568 views
0 votes
1 answer

Getting error while using sqoop import.

You are trying to execute the sqoop ...READ MORE

answered Jul 5, 2019 in Big Data Hadoop by Reshma
171 views
0 votes
1 answer

Sqoop import error with sqoop job

Please try the below command: sqoop job -create ...READ MORE

answered Jul 9, 2019 in Big Data Hadoop by Rina
545 views
0 votes
1 answer

SQOOP Import error - Invalid argurments

Hi@Vikramraj, You have passed wrong arguments in your ...READ MORE

answered Sep 1 in Big Data Hadoop by MD
• 55,100 points
33 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,950 points
5,840 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,950 points
872 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
36,703 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,320 points
2,186 views
0 votes
1 answer

Hadoop sqoop import not working. Error: ERROR manager.SqlManager: Error reading from database

In the command, try mentioning the driver ...READ MORE

answered Dec 5, 2018 in Big Data Hadoop by Omkar
• 69,030 points
593 views
0 votes
1 answer