0

I am trying to pull data from a MySQL database into Impala with the following sqoop command.

sqoop import --connect jdbc:mysql://<ip>:3306/mydb --username user --password pass --fetch-size -2147483648 --query 'select (id,action,object,time) from events WHERE $CONDITIONS and id > 0' --hive-table events --hive-import --target-dir /user/cloud/joinedres --split-by id --num-mappers 1

The error I am getting is

Error executing statement: java.sql.SQLException: Operand should contain 1 column(s).

Prior to that the SqlManager reported WHERE (1 = 0) as part of the Executing SQL statement

jiveturkey
  • 2,484
  • 1
  • 23
  • 41
  • What is in $conditions? – Shadow Mar 22 '16 at 17:00
  • Since I'm running this in parallel, the documentation (https://sqoop.apache.org/docs/1.4.1-incubating/SqoopUserGuide.html#_free_form_query_imports) says I should use this `$CONDITIONS` token – jiveturkey Mar 22 '16 at 17:08
  • I would check the resulting sql command, I suspect sg goes wrong with the substitution of the split field criterion. – Shadow Mar 22 '16 at 17:21

0 Answers0