After some further attempts/research, I found that DB2 does support
--update-key id
but does not yet have support for
--update-mode allowinsert
Meaning you cannot do upserts to DB2 using sqoop, but you can do updates and inserts separately. For updates, simply use --update-key id and for inserts, remove the argument altogether.
However, it should be noted that if your data set contains updates & inserts and you try to do an insert without the --update-key, the export will fail. You first need to separate your data into new records/updated records and then push each of them individually.
Lastly, doing an update where there are also new records will simply ignore the new records and will not fail. However, the new records will not be inserted even though the sqoop stdout tells you all records were exported.
--verboseand post the log.