sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robber Phex <robberp...@gmail.com>
Subject mysql to hbase, how to custom row-family?
Date Mon, 20 May 2013 13:42:14 GMT
I have a table in mysql like this:
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id    | int(11)     | NO   | PRI | NULL    |       |
| name  | varchar(45) | YES  |     | NULL    |       |
| age   | int(11)     | YES  |     | NULL    |       |
| email | varchar(20) | YES  |     | NULL    |       |
| title | varchar(10) | YES  |     | NULL    |       |
+-------+-------------+------+-----+---------+-------+
I want to export it to hbase by sqoop.
I execute this:
sqoop import --connect jdbc:mysql://h2/test --username testu --password
testp \
  --table testtable --hbase-create-table --hbase-table hbasetable \
  --column-family name --column-family age --column-family email
--column-family title \
  --hbase-row-key id

I get full data in hbase, but I want custom row-family. Exactly I need
transformation like this:

HBase                       MySQL Columns

row key    <-----------     id
baseinfo   <-----------     name
                 `-<---     age
workinfo   <-----------     email
                 `-<---     title

Anyone have any idea?

-- 
Regards,
RobberPhex

About me: http://about.me/RobberPhex

Mime
View raw message