Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1-incubating
    • Fix Version/s: 1.4.2
    • Component/s: connectors
    • Labels:
      None

      Description

      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:

      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
      
      
      1. SQOOP-468.patch
        12 kB
        Cheolsoo Park

        Activity

          People

          • Assignee:
            Cheolsoo Park
            Reporter:
            Prashant Gokhale
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development