使用sqoop将数据从RDMS导入Hadoop时。如果我的源系统包含垃圾字符,我们如何替换它们
例如:1,punâ€,旅行,
答案 0 :(得分:1)
垃圾字符的定义可能会根据存储的数据和数据使用情况而有所不同。 Sqoop
导入允许删除Hive
分隔符(通过--hive-drop-import-delims
选项)或替换Hive
分隔符(通过--hive-delims-replacement
选项)。在导入作业将数据放置在Hadoop上之后,还需要完成其他形式的数据处理。
根据Sqoop documentation:
--hive-drop-import-delims: Drops \n, \r, and \01 from string fields when importing to Hive.
--hive-delims-replacement: Replace \n, \r, and \01 from string fields with user defined string when importing to Hive.