sqoop-syntaxt error-boundary query-“sql语法错误”

xqk2d5yq  于 2021-06-03  发布在  Sqoop
关注(0)|答案(1)|浏览(419)

我正在尝试使用sqoop将一些数据从mysql加载到hive表中。我有一些边界查询的条件。我的命令是:

sqoop import --connect jdbc:mysql://localhost:3306/retail_db --username retail_dba --password cloudera --table order_items --boundary-query "SELECT 1,10 FROM order_items WHERE $CONDITIONS" --split-by order_id --hive-import --hive-home /user/cloudera/hive --hive-table default.order_items2 --create-hive-table

当我执行命令时,会出现以下错误:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

你知道为什么吗?
谢谢!

gfttwv5a

gfttwv5a1#

不需要在where子句中指定$conditions

相关问题