Uploaded image for project: 'Sqoop (READ-ONLY)'
  1. Sqoop (READ-ONLY)
  2. SQOOP-161

Auto-generated SQL doesn't work for DB2 imports

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: import
    • Labels:
      None
    • Environment:
      Linux, DB2, JDBC

      Description

      Using Sqoop to import data from DB2 (via JDBC) breaks because of column aliases. Example query generated by Sqoop:

      SELECT col1, col2 FROM db2.table_name AS db2.table_name WHERE ( 1=1 ) AND ( 1=1 )

      Workaround is to supply free-form query and replacing

      AS db2.table_name

      with

      AS db2_table_name

      (removing/replacing the dot). Apparently DB2 doesn't like the dot in the alias name.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michael Michael Katzenellenbogen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: