当我尝试使用sqoop从mysql数据库导入数据时
sqoop import --connect jdbc:mysql://100.107.57.141/mysql --username test -P --query 'SELECT FirstName, Education, Car_Details FROM emp e JOIN emp_test_new etn on e.id=etn.id) WHERE $CONDITIONS' --split-by id --target-dir /home/join我正在犯以下错误:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:您的SQL语法出现了错误;请检查与MySQL服务器版本对应的手册,以获得在第1行(1 =0)使用的正确语法 17/08/05 12:04:25错误tool.ImportTool:遇到IOException运行导入作业: java.io.IOException:没有要为ClassWriter生成的列
发布于 2017-08-06 03:50:19
你在(附近的JOIN ON条件下失踪了。
正确的sytnatx:
sqoop import --connect jdbc:mysql://100.107.57.141/mysql --username test -P \
--query "SELECT e.FirstName, e.Education, e.Car_Details \
FROM emp e JOIN emp_test_new etn ON (e.id == etn.id) \
WHERE $CONDITIONS' --split-by id --target-dir /home/join发布于 2018-07-02 07:26:23
ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter.对于上述错误,请使用下面的命令:
--driver com.mysql.jdbc.Driverhttps://stackoverflow.com/questions/45523928
复制相似问题