我正在尝试使用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
你知道为什么吗?
谢谢!
1条答案
按热度按时间gfttwv5a1#
不需要在where子句中指定$conditions