Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Fetching Hbase data through Hive


Copy link to this message
-
Re: Fetching Hbase data through Hive
Hi Bejoy,

   Thanks a lot for the valuable info and the link..I was just going
through the HbaseIntegration document..:)

Regards,
    Mohammad Tariq

On Fri, Dec 16, 2011 at 1:11 AM, Bejoy Ks <[EMAIL PROTECTED]> wrote:
> Hi Tariq
>      You need to issue a ddl where you specify to hive how the row key and
> column families in hbase are mapped to various columns in hive. You don't
> need to do any data transfer from Hbase to hive that time. The DDL makes the
> hive table point to the corresponding hbase table and when you issue a hive
> query relative the hbase table, the actual hbase table location is scanned
> and the data is fetched.
>
> A sample DDL is as follows
>
> CREATE EXTERNAL TABLE hbase_table_2(key int, value string)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf1:val")
> TBLPROPERTIES("hbase.table.name" = "some_existing_table");
>
> This url would be good reference for you.
> https://cwiki.apache.org/Hive/hbaseintegration.html
>
> Hope it helps!...
>
> Regards
> Bejoy.K.S
>
>
> ________________________________
> From: Mohammad Tariq <[EMAIL PROTECTED]>
> To: user <[EMAIL PROTECTED]>
> Sent: Friday, December 16, 2011 12:44 AM
> Subject: Fetching Hbase data through Hive
>
> Hello all,
>
>     Is there any way to fetch the data from a table which is already
> present in Hbase using Hive directly??Or do I need to create the
> corresponding table in the Hive first??
>
> Regards,
>     Mohammad Tariq
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB