中文测试
- mysql导入到hdfs
bin/sqoop import \
--connect jdbc:mysql://node03:3306/A \
--username root \
--password 123456 \
--target-dir /A2 \
--table B --m 1
- mysql导入到hive
bin/sqoop import \
--connect "jdbc:mysql://node03:3306/A?useUnicode=true&characterEncoding=utf-8" \
--username root \
--password 123456 \
--table B \
--hive-import \
--m 1 \
--hive-database default;
- 从hdfs导出到mysql
bin/sqoop export \
--connect "jdbc:mysql://node03:3306/A?useUnicode=true&characterEncoding=utf-8" \
--username root \
--password 123456 \
--table B \
--export-dir /user/hive/warehouse/b