我正在尝试使用sqoop export命令将数据从配置单元导出到mysql。
由于我的蜂巢表中的数据包含日语字符,因此mysql表正在加载'?????'而不是使用以下命令显示实际的日语字符。
sqoop export --verbose --connect jdbc:mysql://xx.xx.xx.xxx/Sampledb --username abc --password xyz --table special_char --direct --driver com.mysql.jdbc.Driver --export-dir /apps/hive/warehouse/sampledb.db/special_char --fields-terminated-by ' '
我还尝试在sqoop导出命令的jdbc连接字符串中使用“ useUnicode = true&characterEncoding = UTF-8”。
sqoop export --verbose --connect jdbc:mysql://xx.xx.xx.xxx/Sampledb?useUnicode=true&characterEncoding=UTF-8 --username abc --password xyz --table special_char --direct --driver com.mysql.jdbc.Driver --export-dir /apps/hive/warehouse/sampledb.db/special_char --fields-terminated-by ' '
但是,它引发了以下错误:
Unrecognized argument: —username
有人可以建议我在sqoop导出命令中将查询参数设置为jdbc连接url吗?