hadoopsqoopsap-iq

Error while executing sqoop eval command


I am executing the sqoop command from home dir. This sqoop command are connecting sybase

Sqoop list-tables command is working fine . I am able to see the list of tables

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

but when i execute the below sqoop eval command it throws the below error

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”

Could some one help me on this issue?


Solution

  • I had also faced the same issue and then i replaced the double quote to single of query then it worked for me.

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