大数据全系列 教程
1869个小节阅读:465.1k
目录
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
Table 6. Output line formatting arguments:
Argument | Description |
---|---|
--enclosed-by <char> | Sets a required field enclosing character |
--escaped-by <char> | Sets the escape character |
--fields-terminated-by <char> | Sets the field separator character |
--lines-terminated-by <char> | Sets the end-of-line character |
--mysql-delimiters | Uses MySQL’s default delimiter set: fields: , lines: \n escaped-by: \ optionally-enclosed-by: ' |
--optionally-enclosed-by <char> | Sets a field enclosing character |
xxxxxxxxxx
[root@node3 ~]# cp sqoop3.txt sqoop4.txt
[root@node3 ~]# vim sqoop4.txt
xxxxxxxxxx
import
--connect
jdbc:mysql://node1/result_db
--username
root
--password
123456
--as-textfile
--target-dir
/sqoop/file4
--delete-target-dir
-m
1
-e
select id,browser_name,browser_version from dimension_browser where $CONDITIONS
--fields-terminated-by
\t
命令行:
xxxxxxxxxx
[root@node3 ~]# sqoop --options-file sqoop4.txt
[root@node3 ~]# hdfs dfs -cat /sqoop/file4/part-m-00000
xxxxxxxxxx
1 360 0
2 360 1
3 360 2
......