Sqoop
  1. Sqoop
  2. SQOOP-323

Support for the NVARCHAR datatype

    Details

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

      Description

      Currently the presence of the NVARCHAR datatype results in an error.

      1. SQOOP-323.patch
        1 kB
        Jarek Jarcec Cecho
      2. SQOOP-323.patch
        1 kB
        Jarek Jarcec Cecho
      3. SQOOP-323.patch
        1 kB
        Jarek Jarcec Cecho

        Activity

        Hide
        Jarek Jarcec Cecho added a comment - - edited

        Hi all,
        this issue was pain in the neck for me because my task was to export several tables from Microsoft SQL to hadoop/hive.

        I've created patch that add support for NVARCHAR and NCHAR types to sqoop. It's actually pretty simple - I've just added translations for this type to "String" (both for java and hive).

        I've tried that on several examples and I did not find any inconsistency. However I'm not sure that there aren't needed any text transformations to ensure that data are stored correctly.

        I'm looking forward to any feedback.

        Jarcec

        Show
        Jarek Jarcec Cecho added a comment - - edited Hi all, this issue was pain in the neck for me because my task was to export several tables from Microsoft SQL to hadoop/hive. I've created patch that add support for NVARCHAR and NCHAR types to sqoop. It's actually pretty simple - I've just added translations for this type to "String" (both for java and hive). I've tried that on several examples and I did not find any inconsistency. However I'm not sure that there aren't needed any text transformations to ensure that data are stored correctly. I'm looking forward to any feedback. Jarcec
        Hide
        Bilung Lee added a comment -

        Thanks for the patch, Jarek!

        Could you also add a check for LONGNVARCHAR for completeness?

        Other than that, look good to me.

        Show
        Bilung Lee added a comment - Thanks for the patch, Jarek! Could you also add a check for LONGNVARCHAR for completeness? Other than that, look good to me.
        Hide
        Jarek Jarcec Cecho added a comment -

        I've added support for LONGNVARCHAR as well.

        Show
        Jarek Jarcec Cecho added a comment - I've added support for LONGNVARCHAR as well.
        Hide
        Bilung Lee added a comment -

        +1

        Show
        Bilung Lee added a comment - +1
        Hide
        Arvind Prabhakar added a comment -

        Patch committed. Thanks Jarek!

        Show
        Arvind Prabhakar added a comment - Patch committed. Thanks Jarek!
        Hide
        Hudson added a comment -

        Integrated in Sqoop-jdk-1.6 #20 (See https://builds.apache.org/job/Sqoop-jdk-1.6/20/)
        SQOOP-323. Support for NVARCHAR datatype.

        (Jarek Jarcec Cecho via Bilung Lee)

        arvind : http://svn.apache.org/viewvc/?view=rev&rev=1165981
        Files :

        • /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java
        • /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java
        Show
        Hudson added a comment - Integrated in Sqoop-jdk-1.6 #20 (See https://builds.apache.org/job/Sqoop-jdk-1.6/20/ ) SQOOP-323 . Support for NVARCHAR datatype. (Jarek Jarcec Cecho via Bilung Lee) arvind : http://svn.apache.org/viewvc/?view=rev&rev=1165981 Files : /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java

          People

          • Assignee:
            Jarek Jarcec Cecho
            Reporter:
            Kathleen Ting
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development