使用sqoop从sqlserver导出数据的时候无法替换其中的特殊字符

0
使用下面的语句导出数据:

sqoop import --connect "jdbc:sqlserver://xxxx.xxxx.xxxx.xxxx;username=xxx; password=xxx;database=xxxx" --query "select GoodsCode,GoodsNo,GoodsName,ProdArea from hq.[000].tbgoods where \$CONDITIONS" -m 1 --target-dir /user/hive/warehouse/tmp/tbgoods --as-textfile --input-null-string '\\N' --input-null-non-string '\\N' --fields-terminated-by '\t' --lines-terminated-by '\n' --hive-drop-import-delims --delete-target-dir


然而,表中的字段中含有一些 ‘\t’ ,但是使用这个命令并没有能够删掉其中的 ’\t‘ ,使用--hive-delims-replacement 'x' 也无法替换,请问大家有没有什么其他的办法?
已邀请:
0

Bob - 同程旅游大数据+BI 架构师 2016-02-14 回答

建议在sql中进行替换

要回复问题请先登录注册