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

Flag to expand decimal values to fit AVRO schema

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.6
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      As per https://issues.apache.org/jira/browse/AVRO-1864 when importing from Oracle (or any other database that truncates decimals) Sqoop jobs can fail because the scale of the decimal produced by the database does not match the scale in the AVRO file.

      For instance if the value 3.15 is produced by Oracle and the AVRO decimal scale is 3 (this can happen even if the Oracle column is defined with scale of 3) then the job will fail.

      Can we have a flag (--pad-decimals) that pads incoming values with zeros to fit the AVRO schema (e.g. 3.15 becomes 3.150).

        Attachments

        1. SQOOP-2976.patch
          37 kB
          Fero Szabo
        2. SQOOP-2976.patch
          35 kB
          Fero Szabo

          Issue Links

            Activity

              People

              • Assignee:
                fero Fero Szabo
                Reporter:
                tscott@cloudera.com Thomas Scott
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: