Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Sqoop Import Oracle Error

avatar
Expert Contributor

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

1 ACCEPTED SOLUTION

avatar
Super Guru

@yjiang

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.

https://sqoop.apache.org/docs/1.4.1-incubating/SqoopUserGuide.html#_oracle_case_sensitive_catalog_qu...

View solution in original post

2 REPLIES 2

avatar
Super Guru

@yjiang

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.

https://sqoop.apache.org/docs/1.4.1-incubating/SqoopUserGuide.html#_oracle_case_sensitive_catalog_qu...

avatar
Expert Contributor

Thanks, @Jitendra Yadav

Changing table name and user name to capital letter solved the issue.