sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prashant Gokhale (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-468) Oracle free form queries fail.
Date Fri, 23 Mar 2012 20:33:28 GMT
Oracle free form queries fail.
------------------------------

                 Key: SQOOP-468
                 URL: https://issues.apache.org/jira/browse/SQOOP-468
             Project: Sqoop
          Issue Type: Bug
          Components: connectors
    Affects Versions: 1.4.1-incubating
            Reporter: Prashant Gokhale


Sqoop query I am running:

sqoop import $SQOOP_CONNECTION_STRING --query 'select TESTTABLE.ID,TESTTABLE2.FNAME FROM TESTTABLE
JOIN TESTTABLE2 ON (TESTTABLE.ID = TESTTABLE2.ID ) WHERE TESTTABLE.ID < 3 AND \$CONDITIONS'
--split-by TESTTABLE.ID --target-dir $OUTPUT/query

If I just run this query (select TESTTABLE.ID,TESTTABLE2.FNAME FROM TESTTABLE JOIN TESTTABLE2
ON (TESTTABLE.ID = TESTTABLE2.ID ) WHERE TESTTABLE.ID < 3;) in Oracle, it runs fine, but
sqoop throws an error:

{noformat}
12/03/23 12:41:42 INFO db.DataDrivenDBInputFormat: BoundingValsQuery: SELECT MIN(TESTTABLE.ID),
MAX(TESTTABLE.ID) FROM (select TESTTABLE.ID,TESTTABLE2.FNAME FROM TESTTABLE JOIN TESTTABLE2
ON (TESTTABLE.ID = TESTTABLE2.ID ) WHERE TESTTABLE.ID < 3 AND  (1 = 1) ) t1
12/03/23 12:41:42 INFO mapreduce.JobSubmitter: Cleaning up the staging area /user/prashant/.staging/job_1332458964138_0060
12/03/23 12:41:42 ERROR security.UserGroupInformation: PriviledgedActionException as:prashant
(auth:SIMPLE) cause:java.io.IOException: java.sql.SQLSyntaxErrorException: ORA-00904: "TESTTABLE"."ID":
invalid identifier

12/03/23 12:41:42 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException:
java.sql.SQLSyntaxErrorException: ORA-00904: "TESTTABLE"."ID": invalid identifier

	at org.apache.sqoop.mapreduce.db.DataDrivenDBInputFormat.getSplits(DataDrivenDBInputFormat.java:167)
	at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:451)
	at org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:468)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:360)
	at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1221)
	at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1218)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:396)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1177)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1218)
	at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1239)
	at org.apache.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:119)
	at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:179)
	at org.apache.sqoop.manager.SqlManager.importQuery(SqlManager.java:458)
	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:382)
	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:453)
	at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69)
	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
	at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
	at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "TESTTABLE"."ID": invalid identifier

{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message