Import a MySQL table into an HBase table

The following is a sample command to import data into an HBase table:

$sqoop import -connect jdbc:mysql://localhost/dbname -table <table_name>  --username <username> --password >password>  --hive-import -m 4                                    --hbase-create-table --hbase-table <table_name>--column-family <col family name>

Sqoop imports data into the HBase table column family. The data is converted and inserted as a UTF-8 bytes format.

Get Modern Big Data Processing with Hadoop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.