常用配置:
bin/sqoop import
--connect jdbc:mysql://ip:3306/database?tinyInt1isBit=false
--username xxx
--password xxx
--table xxx
--xxx
--num-mappers 1
--target-dir /xxx/xxx
--delete-target-dir
--direct
--hive-import
--hive-database xxx
--hive-table xxx
--fields-terminated-by ' 01'
注:
1.如果导出的数据库是mysql 则可以添加一个 属性 --direct
加上direct 属性在导出mysql数据库表中的数据会快一点 执行的是mysq自带的导出功能
2.设置
--num-mappers 参数大小
![](https://img2020.cnblogs.com/blog/1387008/202011/1387008-20201120120319657-1345212169.png)