title: Sqoop2 Hbase Import:Could not insert row with null value for row-key column
body: <p>I am trying to migrate the data from oracle to Hbase with sqoop job.It looks like that it has successfully exported but it throws an error while importing the same in Hbase.</p>
  
  <p>Job1:</p>
  
  <pre><code>​ `​sqoop import --verbose --connect *** --username *** --password *** --table 'abc' --columns "MID,EID,RTIMESTAMP,VALUE,UTIMESTAMP" --split-by 'abc.ID' --hbase-table "HPVSQOOP" --column-family "cf1" --hbase-row-key MID,EID,RTIMESTAMP --num-mappers 4 --hbase-bulkload​
  </code></pre>
  
  <p>​where ID is the primary key in Oracle but I want my HBase row-key to be as MID_EID_RTIMESTAMP</p>
  
  <p>​Map-Reduced failed by throwing an Error:
  ​</p>
  
  <blockquote>
    <p>​INFO mapreduce.Job: Task Id : attempt_1492489711789_0014_m_000003_2,
    Status : FAILED Error: java.io.IOException: Could not insert row with
    null value for row-key column: MID,EID,RTIMESTAMP at
    org.apache.sqoop.hbase.ToStringPutTransformer.getPutCommand(ToStringPutTransformer.java:146)
    at
    org.apache.sqoop.mapreduce.HBaseBulkImportMapper.map(HBaseBulkImportMapper.java:83)</p>
  </blockquote>
  
  <p>​
  Another Job with --query is not working with Hbase import.
  ​
  ​Job2:</p>
  
  <pre><code>​sqoop import --verbose --connect *** --username *** --password **' --query "select MID,EID,VALUE,RTIMESTAMP,UTIMESTAMP,ID from database.abc where \$CONDITIONS" --split-by 'abc.ID' --hbase-table "HPVSQOOP" --column-family "cf1" --hbase-row-key "MID,EID,RTIMESTAMP" --num-mappers 4 --hbase-bulkload
  </code></pre>
  
  <p>​ended up throwing an error: 
  ​ </p>
  
  <blockquote>
    <p>ERROR sqoop.Sqoop: Got exception running Sqoop:
    java.lang.NullPointerException java.lang.NullPointerException</p>
  </blockquote>