Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Doubts in '--update-mode allowinsert' argument


Copy link to this message
-
Doubts in '--update-mode allowinsert' argument
In Sqoop User Guide (v1.4.1-incubating), it says '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'.

However, I have some questions:
- How to determine if a row is existing or not? By a specific column or
key?
  (Actually I failed to execute a command with --update-mode argument and
--update-key argument together)
- If I did not specific a column to identify the row, I do not think the
following result I got is as expected, because I want to update the first
row, but sqoop insert a similar row into my table. Any idea?

+------+-------------+-------+-------------+---------+----------------------+
| id   | widget_name | price | design_date | version | design_comment
|
+------+-------------+-------+-------------+---------+----------------------+
*|    1 | sprocket    |  0.25 | 2010-02-10  |       3 | Connects two
gizmos  |
|    1 | sprocket    |  0.25 | 2010-02-10  |       1 | Connects two gizmos
|*
|    2 | gizmo       |  4.00 | 2009-11-30  |       4 | NULL
|
|    3 | gadget      | 99.99 | 1983-08-29  |      13 | Our flagship product
|
+------+-------------+-------+-------------+---------+----------------------+
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB