<?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: creating hive table from hbase in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creating-hive-table-from-hbase/m-p/82298#M84856</link>
    <description>&lt;P&gt;As error describes my&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;create external table statement&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;having&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;2 columns&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;id,name&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;In Hbase mapping I'm having 3 columns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;:key,hl:id,hl:name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create table with 3 columns:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; create external table sample(key int, id int, name string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,hl:id,hl:name") 
TBLPROPERTIES ("hbase.table.name"="hloan","hbase.mapred.output.outputtable"="hloan");&lt;/PRE&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;if&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;key and id&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;columns having same data then I can skip&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;hl:id&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in mapping.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create table with 2 columns:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; create external table sample(id int, name string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,hl:name") 
TBLPROPERTIES ("hbase.table.name"="hloan","hbase.mapred.output.outputtable"="hloan");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Nov 2018 20:25:42 GMT</pubDate>
    <dc:creator>manideep</dc:creator>
    <dc:date>2018-11-13T20:25:42Z</dc:date>
    <item>
      <title>creating hive table from hbase</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creating-hive-table-from-hbase/m-p/82294#M84855</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm getting following error when I run the below command for creating hive table.&lt;/P&gt;&lt;P&gt;sample is my hive table I'm trying to create. hloan&amp;nbsp;is my existing hbase table. Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create external table sample(id int, name string)STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,hl:id,hl:name") TBLPROPERTIES ("hbase.table.name"="hloan","hbase.mapred.output.outputtable"="sample");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FAILED: 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 2 elements while hbase.columns.mapping has 3 elements (counting the key if implicit))&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:53:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creating-hive-table-from-hbase/m-p/82294#M84855</guid>
      <dc:creator>manideep</dc:creator>
      <dc:date>2022-09-16T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: creating hive table from hbase</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creating-hive-table-from-hbase/m-p/82298#M84856</link>
      <description>&lt;P&gt;As error describes my&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;create external table statement&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;having&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;2 columns&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;id,name&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;In Hbase mapping I'm having 3 columns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;:key,hl:id,hl:name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create table with 3 columns:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; create external table sample(key int, id int, name string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,hl:id,hl:name") 
TBLPROPERTIES ("hbase.table.name"="hloan","hbase.mapred.output.outputtable"="hloan");&lt;/PRE&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;if&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;key and id&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;columns having same data then I can skip&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;hl:id&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in mapping.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create table with 2 columns:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; create external table sample(id int, name string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,hl:name") 
TBLPROPERTIES ("hbase.table.name"="hloan","hbase.mapred.output.outputtable"="hloan");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 20:25:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creating-hive-table-from-hbase/m-p/82298#M84856</guid>
      <dc:creator>manideep</dc:creator>
      <dc:date>2018-11-13T20:25:42Z</dc:date>
    </item>
  </channel>
</rss>

