1.sqoop importing data from hive into MySQL
For example:
Sqoop export--connect jdbc:mysql://10.18.101.15:3306/wda--username restdbuser--password 123456--table adl_trend_num _android--export-dir/apps/hive/warehouse/adldb.db/adl_trend_num_android/date_stamp= $date-- Input-fields-terminated-by ' \ t '
2.sqoop importing data from MySQL into hive
For example:
sqoop Import--connect jdbc:mysql://192.168.66.96:3306/sqoop--username sqoop--password sqoop -- Table Students-m 1
3.sqoop importing data from HBase into MySQL
The data in hive tables is imported into the relational database through the Hive intermediate table.
4.sqoop importing data from a relational database into HBase
For example:
Export the Dept table in Oracle (column ID,NAME,ADDR) to the Dept table in HBase (row key is ID, column family is deptinfo)
Sqoop import--append--connect jdbc:oracle:thin:@192.168.66.90:1521:orcl--username Test--password Test--m 1--table de PT--columns id,name,addr--hbase-create-table--hbase-table dept--hbase-row-key ID--column-family deptinfo
Sqoop importing data from Hive, hbase into a relational database