Note: Centos6.4 mysql java connector does not work. Update mysql-connector-java.jar located in /usr/share/java.
Download from

Import the 'salaries' table from the mysql 'test' db into /home/root/

sqoop import --connect jdbc:mysql://node1/test --table salaries --username root --fetch-size 1

Export the contents of /usr/root/salarydata/ into 'salaries2' table in the 'test' mysql db. Use ',' delimited.

sqoop export --connect jdbc:mysql://node1/test --table salaries2 --export-dir salarydata --input-fields-terminated-by "," --username root
  • bigdata/sqoop.txt
  • Last modified: 2018/05/25 14:05
  • (external edit)