Update in sqoop export


In sql database, I have one record. Say (1,Test1)
In hdfs I have 3 records. (1,Test1),(2,Test2),(3,Test3). When I run sqoop export with --update-key and update-mode allowinsert. All of the three records are getting copied. It should copy 2 records as one record is already there in the sql database.
Also, could anyone please share some sqoop export questions?



The reason for duplicate records being inserted is due to non-availability of the primary key in your table your mentioning. please try to add primary key to the table and try export.

Just make sure you have a primary key in your MySQL table and you use that key as the update-key for allowinsert mode to work at its best.


It worked. Thanks.
Could you also provide export practice questions link for CCA 175?



Below Link will be helpfull to you