sqoop参数--hive-drop-import-delims

[复制链接]
查看11 | 回复1 | 2013-3-18 16:36:00 | 显示全部楼层 |阅读模式
本帖最后由 kakaxi8891 于 2013-4-6 14:48 编辑
求助!!!!!!!!!!!!!!!!
Hive will have problems using Sqoop-imported data if your database’s rows contain string fields that have Hive’s default row delimiters (\n and \r characters) or column delimiters (\01 characters) present in them. You can use the --hive-drop-import-delimsoption to drop those characters on import to give Hive-compatible text data. Alternatively, you can use the --hive-delims-replacement option to replace those characters with a user-defined string on import to give Hive-compatible text data. These options should only be used if you use Hive’s default delimiters and should not be used if different delimiters are specified.
那么,如果我的分隔符不是默认的,怎么处理?
如:列分隔符为'\t',数据库中有个字段叫comment,内容包含'\t',我想drop之,要怎么做?

没有pub币,不能悬赏,求大神指点啊

回复

使用道具 举报

千问 | 2013-3-18 16:36:00 | 显示全部楼层
自己顶吧,改了下sqoop的源码,'\t'搞定
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行