sqoop incremental lastmodified with merge-key -
i trying import updated records in hdfs. earlier had 3 part file in hdfs.when run below tool gave error merge key required.
sqoop import --table employee --username training --password training --connect jdbc:mysql://localhost/loudacre --incremental lastmodified --check-column modified --last-value '2016-08-22 19:02:41'
however, when used merge-key option can see part file records in it.
this expected guess. generally, merge tool run after incremental import --incremental lastmodified
mode.
when merging datasets, assumed there unique primary key value in each record (mentioned --merge-key
).
the merge tool run mapreduce job merge datasets one, taking newest available rows each --merge-key
.
check sqoop docs more details.
Comments
Post a Comment