Issues around Sqoop Commands - Query String

Running this sqoop Command in Horton Sandbox:
sqoop import --connect jdbc:mysql://127.0.0.1:3306/retail_db --username retail_dba -P --connection-manager org.apache.sqoop.manager.MySQLManager --query ‘select * from orders WHERE $CONDITIONS’
–split-by order_status --target-dir=/user/root/example/orders9 -m 1

Getting this Error Message:
17/06/11 03:51:16 ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@121314f7 is still active. No statements may be issued when any s
treaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@121314f7 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure th
at you have called .close() on any active streaming result sets before attempting more queries.

@Srinivas

Few observations

  • It is not big data labs issue, it is Sqoop syntax issue, hence category is not correct. I have fixed it.
  • It is not scoop, it is sqoop - I have fixed both subject and the details in the topic
  • You have to use \$CONDITIONS