You probably are doing an operation already supported and provided by
Apache Sqoop (http://sqoop.apache.org). Do try it out to see if its
updates feature solves your need (aside of its other features you can
In either case the trouble is in how the program ends up writing to
the DB. If it has to update a row, such an instruction ought to go -
and if whatever you're using is not doing that, you'll need to modify
it to do so.
On Fri, Apr 12, 2013 at 11:13 AM, Linlin Chen(Sabrina)
<[EMAIL PROTECTED]> wrote:
> I'm trying to use Hadoop to read data, process and then write back to MySql.
> However, it seems as if I can only do insertion. If I try to write back with
> the same primary key(it means update), there will be an error like
> "Duplicate XXX for primary key'. Has anyone solved this problem? And is it
> possible to update? Thanks very much!!!
> Linlin Chen