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

If table name is a qualified name, Sqoop import fails in DB2

    Details

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

      Description

      In DB2, it is OK to have a dot "." in table name, but it is not in alias. For example, the following query fails:

      SELECT * FROM foo.bar AS foo.bar
      
      SQL0104N  An unexpected token "." was found following "from foo.bar as foo".  
      Expected tokens may include:  ",".  SQLSTATE=42601
      

      During the import job, Sqoop uses the following select query:

      SELECT <column names> FROM <table name> AS <table name>
      

      As can be seen, it can be a problem for DB2 if table name has a dot "." in it.

        Attachments

        1. SQOOP-476.patch
          15 kB
          Cheolsoo Park

          Activity

            People

            • Assignee:
              cheolsoo Cheolsoo Park
              Reporter:
              cheolsoo Cheolsoo Park
            • Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: