Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-2945

Oracle CLOB mapped to String is unable to import the data (SQLException in nextKeyValue)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.6
    • Fix Version/s: 1.5.0
    • Component/s: connectors/oracle
    • Labels:
      None

      Description

      If we map any CLOB column from Oracle to String with "--map-column-java CLOB_COL=String" during Sqoop import, we are hitting below exception:

      ...
      map 0% reduce 0%
      map 50% reduce 0%
      Task Id : attempt_1462336475649_1097_m_000000_0, Status : FAILED
      Error: java.io.IOException: SQLException in nextKeyValue
      at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:277)
      at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:556)
      at org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:80)
      at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:91)
      at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
      at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
      at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
      at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
      at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
      ...

      As we like to store the result in Hive (which do not support CLOB), we need to map this column to String.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              senthils Senthil Ganesh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: