sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikash Talanki -X (vtalanki - INFOSYS LIMITED at Cisco)" <vtala...@cisco.com>
Subject RE: sqoop import with LIMIT clause in query
Date Wed, 02 Jul 2014 04:37:12 GMT
Hi Binal,

Can you please try this

sqoop import --connect <connect-string> --username <user> --password <pwd>
--target-dir <dir> --query "select * from <table name> LIMIT 5 AND \\$CONDITIONS"
--split-by CREATE_D

Thanks,
Vikash Talanki
+1 (408)838-4078

From: Binal Jhaveri [mailto:binal165@gmail.com]
Sent: Tuesday, July 01, 2014 9:01 PM
To: user@sqoop.apache.org
Subject: sqoop import with LIMIT clause in query

I am trying to run a query to get only 5 rows. I am using it for debugging purposes.
sqoop import --connect <connect-string> --username <user> --password <pwd>
--target-dir <dir> --query "select * from <table name> LIMIT 5" --split-by CREATE_DATE
by running the above query, I get the below error:
Encountered IOException running import job: java.io.IOException: Query [select * from MSP.SPORT_ACTIVITY
LIMIT 5] must contain '$CONDITIONS' in WHERE clause.
sqoop import --connect <connect-string> --username <user> --password <pwd>
--target-dir <dir> --query "select * from <table name> LIMIT 5 AND \$CONDITIONS"
--split-by CREATE_DATE
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
Mime
View raw message