我是靠谱客的博主 疯狂睫毛,这篇文章主要介绍Sqoop测试命令,现在分享给大家,希望可以做个参考。

Sqoop测试命令一:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
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测试命令二:如果使用双引号,则$之前要加转义字符反斜杠

复制代码
1
2
3
4
5
6
7
8
9
10
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测试命令三:如果使用单引号,则$之前不需要加转义字符反斜杠

复制代码
1
2
3
4
5
6
7
8
9
10
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测试命令内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部