Home > Database > Mysql Tutorial > sqoop导入时删除string类型字段的特殊字符

sqoop导入时删除string类型字段的特殊字符

WBOY
Release: 2016-06-07 15:57:05
Original
1717 people have browsed it

如果你指定了\n为sqoop导入的换行符,mysql的某个string字段的值如果包含了\n, 则会导致sqoop导入多出一行记录。 有一个选项 -hive-drop-import-delims Drops \n, \r, and \01 from string fields when importing to Hive.

如果你指定了\n为sqoop导入的换行符,mysql的某个string字段的值如果包含了\n, 则会导致sqoop导入多出一行记录。

有一个选项

-hive-drop-import-delims	 Drops \n, \r, and \01 from string fields when importing to Hive.
Copy after login


这样\n \r 和\01都被自动删除,不会捣乱了。


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template