[
https://issues.apache.org/jira/browse/SQOOP-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14905339#comment-14905339
]
DeepakVohra commented on SQOOP-2587:
------------------------------------
The --update-key has to be a PRIMARY KEY for new rows to be added with
--update-mode as "allowinsert". Issue may be closed and documentation updated
to include the requirement for the update key to a unique key such as a primary
key.
> allowinsert mode implementation
> -------------------------------
>
> Key: SQOOP-2587
> URL: https://issues.apache.org/jira/browse/SQOOP-2587
> Project: Sqoop
> Issue Type: Bug
> Affects Versions: 1.4.5
> Environment: MySQL 5.x
> CDH 5.2 Sqoop 1.4.5
> CDH 5.2 Hadoop 2.5
> CDH 5.2 Hive 0.13.1
> CDH 5.2 HBase 0.98.6
> Reporter: DeepakVohra
>
> The allowinsert mode is not implemented as described.
> "Depending on the target database, you may also specify the --update-mode
> argument with allowinsert mode if you want to update rows if they exist in
> the database already or insert rows if they do not exist yet."
> https://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html#_inserts_vs_updates
> But, if both --update-key and --update-mode "allowinsert" are set new rows
> are added even if rows already exist for the update key specified. The
> existing rows are not updated and new rows are added instead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)