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

boolean fields get nullified during postgres direct import into hive.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.4.2
    • connectors/postgresql

    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_diffs1.txt
          3 kB
          Boris Partensky
        2. sqoop_diffs2.txt
          3 kB
          Boris Partensky
        3. sqoop.patch
          3 kB
          Boris Partensky

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: