The syntax for this is very similar to the original one.
CREATE EXTERNAL TABLE t (
id string,
cf map
) WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:*my_prefix.**")
and then it can be queried similar to how you were querying before.
On Wed, Feb 19, 2014 at 8:09 PM, kulkarni.swar.
Hi Den,
I think that is a valid solution. If you are using a version of hive >
0.12, you can also select columns from hbase using prefixes (introduced in
[1]). Marginally more efficient than the "select all columns" approach and
little more flexible as now just all columns sharing the given prefix
I've arrived at a workaround that I'm using for this for now. Basically I
have a map in the Hive table corresponding to the column family then I'm
able to select from it. The downside here is that every qualifier has to
have the same data type and storage type, which I suppose you could work
around
I assume by 'escape' you mean something like:
"hbase.columns.mapping" = ":key,cf:q1\:q2"
That gave the same error as before. If that's not what you mean could you
expand?
I also tried to see if I could trick it by doing some binary encoding of
the character
"hbase.columns.mapping" = ":key,cf:q1
Hi Den,
Have you tried escaping the additional colon in the qualifier name?
On Fri, Feb 14, 2014 at 9:47 AM, Den wrote:
> I'm working with an HBase database with a column of the form 'cf:q1:q2'
> where 'cf' is the column family 'q1:q2' is the column qualifier. When
> trying to map this in Hive
I'm working with an HBase database with a column of the form 'cf:q1:q2'
where 'cf' is the column family 'q1:q2' is the column qualifier. When
trying to map this in Hive I'm using a statement like the following:
CREATE EXTERNAL TABLE t (
id string
q1_q2 string
) WITH SERDEPROPERTIES ("hbase.col