Sqoop
  1. Sqoop
  2. SQOOP-368

Resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'COLUMN-NAME'

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0-incubating
    • Fix Version/s: 1.4.0-incubating
    • Component/s: tools
    • Environment:

      64bit Ubuntu 10.10 Linux, Java build 1.6.0_24-b07, mysql 5.1.49-1ubuntu8.1

      Description

      for execute this command:
      import --connect jdbc:mysql://localhost/sqoop_datas --username root --password 123456 --query "select sqoop_source_datas.id as foo_id, sqoop_2.id as bar_id from sqoop_source_datas ,sqoop_2 WHERE $CONDITIONS" --target-dir /tmp/sqoop/foo -split-by foo_id --hadoop-home=/home/guoyun/Downloads/hadoop-0.20.2-CDH3B4

      because table sqoop_source_datas and table sqoop_2 have the same column:id.so it will report error:resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'ID'

      For patch:query-column.alias.patch,we must set the parameter split-by to real column name.for my example,i must set split-by to sqoop_source_datas.id,not foo_id

        Activity

        guoyun created issue -
        guoyun made changes -
        Field Original Value New Value
        Summary resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'ID' Resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'COLUMN-NAME'
        Original Estimate 504h [ 1814400 ] 48h [ 172800 ]
        Remaining Estimate 504h [ 1814400 ] 48h [ 172800 ]
        Labels import mysql sqoop alias column import mysql sqoop
        Description for execute this command:import --connect jdbc:mysql://localhost/sqoop_datas --username root --password 123456 --query "select sqoop_source_datas.id as foo_id, sqoop_2.id as bar_id from sqoop_source_datas ,sqoop_2 WHERE $CONDITIONS" --target-dir /tmp/sqoop/foo -split-by foo_id --hadoop-home=/home/guoyun/Downloads/hadoop-0.20.2-CDH3B4
        because table sqoop_source_datas and table sqoop_2 have the same column:id.so it will report error:resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'ID'

        for execute this command:
        import --connect jdbc:mysql://localhost/sqoop_datas --username root --password 123456 --query "select sqoop_source_datas.id as foo_id, sqoop_2.id as bar_id from sqoop_source_datas ,sqoop_2 WHERE $CONDITIONS" --target-dir /tmp/sqoop/foo -split-by foo_id --hadoop-home=/home/guoyun/Downloads/hadoop-0.20.2-CDH3B4

        because table sqoop_source_datas and table sqoop_2 have the same column:id.so it will report error:resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'ID'

        guoyun made changes -
        Attachment query-column.alias.patch [ 12499838 ]
        guoyun made changes -
        Description for execute this command:
        import --connect jdbc:mysql://localhost/sqoop_datas --username root --password 123456 --query "select sqoop_source_datas.id as foo_id, sqoop_2.id as bar_id from sqoop_source_datas ,sqoop_2 WHERE $CONDITIONS" --target-dir /tmp/sqoop/foo -split-by foo_id --hadoop-home=/home/guoyun/Downloads/hadoop-0.20.2-CDH3B4

        because table sqoop_source_datas and table sqoop_2 have the same column:id.so it will report error:resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'ID'

        for execute this command:
        import --connect jdbc:mysql://localhost/sqoop_datas --username root --password 123456 --query "select sqoop_source_datas.id as foo_id, sqoop_2.id as bar_id from sqoop_source_datas ,sqoop_2 WHERE $CONDITIONS" --target-dir /tmp/sqoop/foo -split-by foo_id --hadoop-home=/home/guoyun/Downloads/hadoop-0.20.2-CDH3B4

        because table sqoop_source_datas and table sqoop_2 have the same column:id.so it will report error:resolve ERROR tool.ImportTool: Imported Failed: Duplicate Column identifier specified: 'ID'

        For patch:query-column.alias.patch,we must set the parameter split-by to real column name.for my example,i must set split-by to sqoop_source_datas.id,not foo_id

        guoyun made changes -
        Labels alias column import mysql sqoop alias column import mysql query sqoop
        Arvind Prabhakar made changes -
        Assignee guoyunsky [ guoyunsky ]
        guoyun made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        guoyun made changes -

          People

          • Assignee:
            guoyun
            Reporter:
            guoyun
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 48h
              48h
              Remaining:
              Remaining Estimate - 48h
              48h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development