Sqoop - 语法错误 - 边界查询 - “SQL 语法错误"; [英] Sqoop - Syntaxt error - Boundary Query - "error in your SQL syntax"

查看:103
本文介绍了Sqoop - 语法错误 - 边界查询 - “SQL 语法错误";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Sqoop 将一些数据从 MYSQL 加载到 Hive 表中.我对边界查询有一些条件.我的命令是:

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

你知道为什么吗?

谢谢!

推荐答案

无需在where子句中指定$CONDITIONS

No need to specify $CONDITIONS in where clause

这篇关于Sqoop - 语法错误 - 边界查询 - “SQL 语法错误";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆