2

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?

markp-fuso
  • 28,790
  • 4
  • 16
  • 36
Surender Raja
  • 3,553
  • 8
  • 44
  • 80
  • Which Sybase product (ASE, SQLAnywhere, IQ or Advantage)? And what version? – markp-fuso Aug 09 '17 at 18:41
  • I am connecting to Sybase IQ – Surender Raja Aug 09 '17 at 18:45
  • What happens if you wrap the query in single quotes instead of double quotes? The mention of some tables, which I'm assuming reside in the same directory where you're running this script, would seem (to me) to imply the `SELECT * FROM...` is being expanded into `SELECT records.txt sample_json.txt sample_simple.txt test FROM...` – markp-fuso Aug 09 '17 at 20:08
  • Not clear why you're using eval. Aren't those parameters to sqoop import? Also, where is records.txt coming into the command? – OneCricketeer Aug 09 '17 at 23:39

1 Answers1

2

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'

tomerpacific
  • 4,704
  • 13
  • 34
  • 52
A.N.Gupta
  • 331
  • 1
  • 5
  • 16