You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by ram kumar <ra...@gmail.com> on 2016/03/11 09:49:57 UTC

HBase table map to hive

Hi,
I have a HBase table with rowkey and column family.
Is it possible to map HBase table to hive table?

Thanks

Re: HBase table map to hive

Posted by Divya Gehlot <di...@gmail.com>.
yes you can
Register table in hive based in hbase

CREATE EXTERNAL TABLE IF NOT EXISTS DB_NAME.TABLE_NAME(COL1 STRING,COL2
STRING,COL3 STRING)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:COL2,cf:COL3")
TBLPROPERTIES ("hbase.table.name" = "HBASE_TABLE_NAME",
"hbase.mapred.output.outputtable" = "HBASE_TABLE_NAME");


On 11 March 2016 at 16:49, ram kumar <ra...@gmail.com> wrote:

> Hi,
> I have a HBase table with rowkey and column family.
> Is it possible to map HBase table to hive table?
>
> Thanks
>