问题
I am tryin to load some data from MYSQL into Hive table using Sqoop. I have some conditions on boundary query. My command is:
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
And when I execute my command it gives the following error:
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
Do you know why?
Thanks!
回答1:
No need to specify $CONDITIONS in where clause
来源:https://stackoverflow.com/questions/53694497/sqoop-syntaxt-error-boundary-query-error-in-your-sql-syntax