Sqoop
  1. Sqoop
  2. SQOOP-830

HBase import formatting BigDecimal inconsistently

    Details

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

      Description

      When importing into HBase the toString() method is called on every field via the ToStringPutTransformer class.
      When the field is mapped as a BigDecimal - as it is with number fields in Oracle - this results in inconsistent formats in HBase.
      For example - create the following in Oracle:

      CREATE TABLE employee(id number primary key, test_number number);
      INSERT INTO employee values(1, 0.000001);
      INSERT INTO employee values(2, 0.0000001);
      COMMIT;

      Then run an import:

      sqoop import --connect jdbc:oracle:thin:@//HOSTNAME/SERVICE --username USERNAME --table EMPLOYEE --password PASSWORD --hbase-table EMPLOYEE --column-family tst --hbase-create-table

      The value for row 1 is "0.000001" while row 2 is "1E-7".

      1. SQOOP-830.patch
        19 kB
        David Robson
      2. SQOOP-830.patch
        7 kB
        David Robson

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              David Robson
              Reporter:
              David Robson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development