<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Error when copying table from Hive to HBase. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142674#M52311</link>
    <description>&lt;P&gt;I would guess that the problem is that you are not explicitly providing a :key column which makes your value actually have 10+1 entries instead of just 10.&lt;/P&gt;&lt;P&gt;You will want to map one of the Hive columns you are selecting into the HBase rowKey. This is done by including a ":key" entry in the value for "hbase.columns.mapping". This is what defines uniqueness in each record.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-ColumnMapping" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-ColumnMapping&lt;/A&gt; for more information.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2017 05:20:18 GMT</pubDate>
    <dc:creator>elserj</dc:creator>
    <dc:date>2017-01-24T05:20:18Z</dc:date>
    <item>
      <title>Error when copying table from Hive to HBase.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142673#M52310</link>
      <description>&lt;P&gt;Hello. I am trying to copy an existing table from Hive to a new table in HBase with the following query:&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;CREATE TABLE hbase_lineitem (part_key int, item_id int, category_id int, dept_id int, quantity int, price double, discount double, tax double, flag_1 string, flag_2 string) &lt;/P&gt;&lt;P&gt;STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' &lt;/P&gt;&lt;P&gt;WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":part_key,lineitem:item_id,lineitem:category_id,lineitem:dept_id,lineitem:quantity,lineitem:price,lineitem:discount,lineitem:tax,lineitem:flag_1,lineitem:flag_2"); &lt;/P&gt;&lt;P&gt;INSERT OVERWRITE TABLE hbase_lineitem SELECT * FROM lineitem;&lt;/P&gt;&lt;P&gt;---------------------------------------------------&lt;/P&gt;&lt;P&gt;However, I am receiving the following error: &lt;/P&gt;&lt;P&gt;Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 10 elements while hbase.columns.mapping has 11 elements (counting the key if implicit))&lt;/P&gt;&lt;P&gt;I only count 10 elements in both of my lists, so can anyone help me figure out what mistake I am making? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 05:09:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142673#M52310</guid>
      <dc:creator>m_poutas</dc:creator>
      <dc:date>2017-01-24T05:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error when copying table from Hive to HBase.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142674#M52311</link>
      <description>&lt;P&gt;I would guess that the problem is that you are not explicitly providing a :key column which makes your value actually have 10+1 entries instead of just 10.&lt;/P&gt;&lt;P&gt;You will want to map one of the Hive columns you are selecting into the HBase rowKey. This is done by including a ":key" entry in the value for "hbase.columns.mapping". This is what defines uniqueness in each record.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-ColumnMapping" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-ColumnMapping&lt;/A&gt; for more information.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 05:20:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142674#M52311</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-01-24T05:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error when copying table from Hive to HBase.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142675#M52312</link>
      <description>&lt;P&gt;If I correctly understand, you need to change :part_key to :key.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 05:25:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142675#M52312</guid>
      <dc:creator>ssoldatov</dc:creator>
      <dc:date>2017-01-24T05:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error when copying table from Hive to HBase.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142676#M52313</link>
      <description>&lt;P&gt;This fixed the issue, appreciate it!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 05:26:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-when-copying-table-from-Hive-to-HBase/m-p/142676#M52313</guid>
      <dc:creator>m_poutas</dc:creator>
      <dc:date>2017-01-24T05:26:14Z</dc:date>
    </item>
  </channel>
</rss>

