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

NCLOB import to Hive not supported

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.6
    • Fix Version/s: None
    • Component/s: hive-integration
    • Labels:
      None

      Description

      Hi,
      Sqoop cannot import and create Hive table when the table to be imported contains NCLOB columns.
      Actually, data is correctly imported into HDFS but Hive table creation fails with :
      ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Hive does not support the SQL type for column myNClobColumn
      at org.apache.sqoop.hive.TableDefWriter.getCreateTableStmt(TableDefWriter.java:181)
      at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:188)
      at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:514)
      at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
      at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
      at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
      at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
      at org.apache.sqoop.Sqoop.main(Sqoop.java:244)

      That issue is due to the fact SQOOP knows CLOB type but not NCLOB. See type mappings in org.apache.sqoop.hive.HiveTypes where NCLOB is not.

      Regards

        Attachments

          Activity

            People

            • Assignee:
              bbonnet Benjamin BONNET
              Reporter:
              bbonnet Benjamin BONNET
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: