phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Kukkala <vijay.kukk...@gmail.com>
Subject Parsing rowkey of existing Hbase table while creating a View
Date Wed, 03 Dec 2014 14:53:28 GMT
Hi,
Phoenix version: 4.0  on HDP 2.1
I have an existing Hbase table with rowkey whose format is (customerId,
date, category). It is stored as bytes[100] in Hbase.
I am trying to create a Phoenix view on this table using this DDL command
create table "events" (pk VARBINARY PRIMARY KEY, D."pc" VARCHAR, D."un"
VARCHAR, D."ug" VARCHAR, D."c0" VARCHAR);

I am able to access the column values correctly. The PK shows up as a
address location. I have two questions
* Primary Key: Is this correct conversion? Is there a way to parse the
rowkey using functions or any other way. I know the offset of each
attribute.
* Columns: Is there a way to specify columns dynamically
we store array values with qualifiers as c[0-3]

I am trying to migrate the old Hbase data to a phoenix table where the
rowKey is split into specific columns

thanks in advance,
Vijay

Mime
View raw message