hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kulkarni.swarnim@gmail.com" <kulkarni.swar...@gmail.com>
Subject Re: HBase and Hive
Date Mon, 16 Sep 2013 23:59:47 GMT
> "hbase.columns.mapping" = ":key,f:*vals*"

This is where the error is. Instead of "vals", you should have the name of
the column under that column family. If you want to pull in all the column
you can simply change it to "f:" and it will pull in all the columns.
However be sure to change the corresponding hive column to be of a map type
then.

Hope this helps.


On Mon, Sep 16, 2013 at 6:33 PM, Michael Kintzer <rockrep@yahoo.com> wrote:

> Hi,
>
> Newbie here.
>
> hbase 0.94.11
> hadoop 1.2.1
> hive 0.11.0
>
> I've created an HBase table in hbase shell using command:   create
> 'mytable', 'f'
>
> I've loaded data into that table using a thrift Ruby client.   A table row
> has a string key like 'someurl.com:yyyy-mm-dd'.   The column-family 'f'
> has a variable number of columns/cells of data that look like:
>
> 'f:n'  timestamp=<some timestamp>, value='some JSON',  where n is an
> integer.
>
> All this data is viewable in hbase shell and via thrift.
>
> I've created a Hive external table pointing to this HBase table with:
>
> create external table hbase_mytable (id string, vals ARRAY<string>)
>
>   STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
>   WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f:vals")
>
>   TBLPROPERTIES ("hbase.table.name" = "mytable");
>
>
> This succeeds.  However any Hive QL queries against this table return no
> data.   Even select count(*) from hbase_mytable return 0 records.
>
> Anyone have a suggestion for me as to what might be missing from my hive
> installation that prevents it from seeing the data in the HBase table?
>
> Much appreciated,
>
> Michael
>



-- 
Swarnim

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message