Sqoop测试命令一:
bin/sqoop import
--connect jdbc:mysql://hadoop102:3306/gmall
--username root
--password 000000
--table user_info
--columns id,login_name
--where "id>=10 and id<=30"
--target-dir /test
--delete-target-dir
--fields-terminated-by 't'
--num-mappers 2
--split-by id
Sqoop测试命令二:如果使用双引号,则$之前要加转义字符反斜杠
bin/sqoop import
--connect jdbc:mysql://hadoop102:3306/gmall
--username root
--password 000000
--query "select id,login_name from user_info where id>=10 and id<=30 and $CONDITIONS"
--target-dir /test
--delete-target-dir
--fields-terminated-by 't'
--num-mappers 2
--split-by id
Sqoop测试命令三:如果使用单引号,则$之前不需要加转义字符反斜杠
bin/sqoop import
--connect jdbc:mysql://hadoop102:3306/gmall
--username root
--password 000000
--query 'select id,login_name from user_info where id>=10 and id<=30 and $CONDITIONS'
--target-dir /test
--delete-target-dir
--fields-terminated-by 't'
--num-mappers 2
--split-by id
最后
以上就是疯狂睫毛最近收集整理的关于Sqoop测试命令的全部内容,更多相关Sqoop测试命令内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复