Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop >> mail # user >> sqoop import primary key is not included in the column family anymore


Copy link to this message
-
sqoop import primary key is not included in the column family anymore
Hi guys,

I have a mysql table looks like:

Mebmer_ID <- primary key
Member_Name
Member_Type

I ran the command below:

./bin/sqoop import --connect jdbc:mysql://${ip}/testdb   -username root
-password blabla --query 'SELECT * from member  where Member_ID < 5 AND
$CONDITIONS' --split-by Member_ID --hbase-create-table --hbase-table member
 --column-family i

But after import, I see hbase table looks like:
rowkey   -  row : 1
Columns - Member_name=bla, Member_Type=bla

Note that Sqoop turned my Member_ID to Rowkey which is expected. But in my
columns, I am seeing all the other fields except Member_ID. Is there anyway
I can have Member_ID as my rowkey,also in Column Family, having the
Member_ID column included as well?

Shengjie
+
Jarek Jarcec Cecho 2013-09-22, 20:08