3
votes

I am trying to import data from Mysql to Hbase using sqoop. I am running following command.

sqoop import --connect jdbc:mysql://localhost/database --table users --columns "loginid,email" --username tester -P -m 8 --hbase-table hbaseTable --hbase-row-key user_id --column-family user_info --hbase-create-table

But i am getting below error :-

13/05/08 10:42:10 WARN hbase.ToStringPutTransformer: Could not insert row with null value for row-key column: user_id

please help here

2
Did you check that your user_ID doesn't have Null value?Maryam Arshi
Yes .. I checked .. user_id is primary key in my table. All rows have a value for it.Vimal Jain
one strange thing i noticed - when i dont specify "--columns" options , above command works just fine.But i need this option in order to have multiple column families in my hbase table.I will issue above command multiple times , each time for a different column family and set of columns.Vimal Jain
Somebody please reply.Vimal Jain

2 Answers

2
votes

Got the solution. I was not including my rowKey i.e. user_id in the columns list. After including it , it worked like a charm. Thanks..

1
votes

Your columns should be upper status, not seq_id but SEQ_ID.

I think sqoop considering it as a different column.which is null(Of course).