Reputation: 33
I have my data store into hive table. i want to transfer hive tables selected data to mysql table using sqoop.
Please guide me how to do this?
Upvotes: 0
Views: 5047
Reputation: 3966
You need to use sqoop export, here is the example
sqoop export --connect "jdbc:mysql://quickstart.cloudera:3306/retail_rpt_db" \
--username retail_dba \
--password cloudera \
--table departments \
--export-dir /user/hive/warehouse/retail_ods.db/departments \
--input-fields-terminated-by '|' \
--input-lines-terminated-by '\n' \
--num-mappers 2
sqoop export to export data to mysql from Hadoop.
Upvotes: 1