执行sqoop eval命令时出错

时间:2017-08-09 18:35:05

标签: hadoop sqoop sybase-iq

我正在从home dir执行sqoop命令。此sqoop命令正在连接sybase

Sqoop list-tables命令工作正常。我能够看到表格列表

sqoop list-tables \
--connect jdbc:sybase:Tds:omegagold82unsQ:7000/ServiceName=preprod \
--username omega123 \
--password omega1234878 \
--driver com.sybase.jdbc4.jdbc.SybDriver \

但是当我执行下面的sqoop eval命令时,它会抛出以下错误

sqoop eval \
--connect jdbc:sybase:Tds:omegagold82unsQ:7000/ServiceName=preprod \
--username omega123 \
--password omega1234878 \
--driver com.sybase.jdbc4.jdbc.SybDriver \
--query “SELECT * FROM customer_account LIMIT 3” 


17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Error parsing arguments for eval:

17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: records.txt
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: sample_json.txt
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: sample_simple.txt
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: test
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: FROM
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: customer_account
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: LIMIT
17/08/09 19:28:55 ERROR tool.BaseSqoopTool: Unrecognized argument: 3”

有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:2)

我也遇到过同样的问题,然后我将双引号替换为查询的单引号,然后对我有用。

sqoop eval --connect jdbc:mysql://localhost:3306/retail_db --username root -P --query 'SELECT * FROM categories LIMIT 3'