title: Sqoop Merge failed when selected time stamp as column in incremental update
body: <p>I want to practise sqoop merge command .
  What I have done is I have imported data to HDFS from MySQL DB and then updated the source table with 1 update and 1 insert , my table has <code>id</code> as primary key and <code>time</code> as TIMESTAMP . </p>
  
  <p>Next I did once again the import with <code>--incremental=lastmodified --check-column="time"</code> option.</p>
  
  <p>Then did sqoop merge , but it failed with below error. I think there is some mismatch between the data sets of earlier import and latest import but not able to understand what is wrong. Is that because of importing with <code>--check-column=time</code> ? If I update with <code>--where</code> clause it works.</p>
  
  <p>I used :-</p>
  
  <pre><code>--Initial load
  sqoop import \
    --connect "jdbc:mysql://quickstart.cloudera:3306/testdb" \
    --username=root \
    --password=cloudera \
    --table Customers \
    --as-textfile \
    --target-dir=/user/cloudera/sqoop_import/sqoop_merge/Customers
  
  sqoop import \
    --connect "jdbc:mysql://quickstart.cloudera:3306/testdb" \
    --username=root \
    --password=cloudera \
    --table Customers \
    --as-textfile \
    --target-dir=/user/cloudera/sqoop_import/sqoop_merge/Customers_delta \
    --incremental lastmodified \
    --check-column "time" \
    --last-value '2016-08-24 22:04:56.0'
  
  sqoop merge --merge-key department_id \
    --new-data /user/cloudera/sqoop_import/sqoop_merge/Customers_delta \
    --onto /user/cloudera/sqoop_import/sqoop_merge/Customers \
    --target-dir /user/cloudera/sqoop_import/sqoop_merge/Customers_merge \
    --class-name Customers \
    --jar-file /tmp/sqoop-cloudera/compile/d73387fb05f4fcb0d38725806fe52b30/Customers.jar
  </code></pre>
  
  <p>And error is :-</p>
  
  <blockquote>
    <p>16/08/24 22:49:41 INFO mapreduce.Job:  map 13% reduce 0%
        16/08/24 22:49:42 INFO mapreduce.Job: Task Id : attempt_1471947772048_0032_m_000003_2, Status : FAILED
        Error: java.io.IOException: Cannot join values on null key. Did you specify a key column that exists?
            at org.apache.sqoop.mapreduce.MergeMapperBase.processRecord(MergeMapperBase.java:79)
            at org.apache.sqoop.mapreduce.MergeTextMapper.map(MergeTextMapper.java:58)
            at org.apache.sqoop.mapreduce.MergeTextMapper.map(MergeTextMapper.java:34)
            at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
            at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
            at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAs(Subject.java:415)
            at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554)
            at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)</p>
  </blockquote>
  
  <p>Any clue to find out the cause will be really helpful. Thanks.</p>