Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 05-30-2016 11:58 PM
Hi,
I got the below error using Sqoop on HDP 2.4.2 to import data from Oracle. The generate SQL seems to be wrong. It double quotes the table name ("logs") and also has a strange WHERE condition (1=0). I am using
sqoop import --connect jdbc:oracle:thin:@//xxxxxx:1521/ORCL --username admin --password xxxx --table logs --target-dir /user/centos/input/oracle -m 1
16/05/30 23:27:31 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM "logs" t WHERE 1=0 16/05/30 23:27:31 ERROR manager.SqlManager: Error executing statement: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
Created 05-31-2016 12:06 AM
If table is exist in ORCL database then can you please try using table name in capital letter? i.e LOGS
sqoop import --connect jdbc:oracle:thin:@//xxxxxx:1521/ORCL --username ADMIN --password xxxx --table LOGS --target-dir /user/centos/input/oracle -m 1
Also we need to specify the user name in capital letter as per below sqoop doc.
Created 05-31-2016 12:06 AM
If table is exist in ORCL database then can you please try using table name in capital letter? i.e LOGS
sqoop import --connect jdbc:oracle:thin:@//xxxxxx:1521/ORCL --username ADMIN --password xxxx --table LOGS --target-dir /user/centos/input/oracle -m 1
Also we need to specify the user name in capital letter as per below sqoop doc.
Created 05-31-2016 12:18 AM
Thanks, @Jitendra Yadav
Changing table name and user name to capital letter solved the issue.