Sqoop - Syntaxt error - Boundary Query - “error in your SQL syntax”

本小妞迷上赌 提交于 2021-01-29 12:22:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!