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

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

WBOY
WBOYOriginal
2016-06-07 15:57:051645browse

如果你指定了\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.


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


Statement:
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