Example 6 – Load the MySQL customer changed data into the HBase table

Here, we have used the InsUpd_on column as our ETL date:

sqoop import --connect jdbc:mysql://localhost:3306/orders --driver com.mysql.jdbc.Driver --username sales --password sales1 --table customer --hbase-table customer --column-family cf1 --hbase-row-key cust_id --append -- -m 1 --where "InsUpd_on > 1505095060"hbase shellhbase(main):010:0> get 'customer', '4'COLUMN          CELLcf1:InsUpd_on   timestamp=1511509774123, value=1505095065cf1:cust_city   timestamp=1511509774123, value=Dublincf1:cust_name   timestamp=1511509774123, value=Harry Warner3 row(s) in 0.0200 secondshbase(main):011:0> get 'customer', '12'COLUMN           CELLcf1:InsUpd_on    timestamp=1511509776158, value=1505095075cf1:cust_city ...

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.