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

Sqoop code generation in 'update' export mode incompatible with '--columns' option


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.3
    • Component/s: codegen, tools
    • Labels:
    • Environment:


      When using sqoop export with --update-key and --columns the options are incompatible. For example, given table T1

        | T1   |
        | id   |
        | name |
        | mail |
        | cell |

      When using:

      $ sqoop export [ .. ] --update-key id --update-mode allowinsert --columns id,name

      the code generation utility creates a Java file which fails to compile.

      This seems to happen because ConnManager appends all table columns, even those not mentioned on the command-line (see ConnManager.configureDbOutputColumns). As a result, the generated class contains a write method which references class members which do not exist.

      I could suggest two possible solutions: 1) either make this case an exception or 2) make the code that appends all remaining table columns optional.

      I may be missing something as that code is there for a reason, but I can't see why?


        1. bugSQOOP-824.patch
          5 kB
          Jarek Jarcec Cecho

          Issue Links



              • Assignee:
                jarcec Jarek Jarcec Cecho
                stanangeloff Stan Angeloff


                • Created:

                  Issue deployment