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

boolean fields get nullified during postgres direct import into hive.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.4.2
    • Component/s: connectors/postgresql
    • Labels:

      Description

      These diffs address this issue - https://issues.cloudera.org/browse/SQOOP-43.

      I changed DirectPostgresManager.java to special-case rewrite COPY.... command for boolean fields so that hive sees "true"/"false". The only shortcoming with my patch is that because PG jdbc driver can not tell bit data types from booleans, direct import will break with SQL cast errors if someone has real bit fields. Not sure how often people use those, but it will break direct import for that one person who does. If you have an idea on how I can make this better, let me know. Diffs are attached

        Attachments

        1. sqoop_diffs2.txt
          3 kB
          Boris Partensky
        2. sqoop_diffs1.txt
          3 kB
          Boris Partensky
        3. sqoop.patch
          3 kB
          Boris Partensky

          Issue Links

            Activity

              People

              • Assignee:
                magictoken Boris Partensky
                Reporter:
                magictoken Boris Partensky
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: