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

[复制链接]
查看11 | 回复1 | 2021-1-27 05:42:42 | 显示全部楼层 |阅读模式
使用下面的语句导出数据:
sqoopimport--connect"jdbc:sqlserver://xxxx.xxxx.xxxx.xxxx;username=xxx;password=xxx;database=xxxx"--query"selectGoodsCode,GoodsNo,GoodsName,ProdAreafromhq.[000].tbgoodswhere\$CONDITIONS"-m1--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'也无法替换,
请问大家有没有什么其他的办法?
分 -->
回复

使用道具 举报

千问 | 2021-1-27 05:42:42 | 显示全部楼层
使用sqoop只能查sqoop的接口,看支持与否.
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行