sqoop import --connect jdbc:mysql://localhost/test --username root --password root --table user --target-dir /user/root/
sqoop import --connect jdbc:mysql://localhost/test --username root --password root --table user -m 1 --append --target-dir /user/xiangtao/ --direct -- --default-character-set=latin1
sqoop create-hive-table --connect jdbc:mysql://localhost/test --username root --password root --table user_view --hive-table xt_sqoop_user_view
--增量导入
sqoop import --connect jdbc:mysql://localhost/test --username root --password root --table test_sqoop --target-dir /user/root/3/ --as-sequencefile --check-column lastmodified --incremental lastmodified --last-value '2015-05-07 12:33:22'
转载于:https://my.oschina.net/xiangtao/blog/411597