Support Questions
Find answers, ask questions, and share your expertise

How to map a phoenix view/table with a different name to a Hbase table ?

Can I make a view say CAPSULES under schema FNL and map it to a Hbase table capsules under schema fnl ?

Basically, I don't want my Hbase table to be dropped when I drop the corresponding mapped phoenix Table/view.

How can this be achieved without any restart of Regionservers and Master (as I read in one of the links)

Reference :

https://community.hortonworks.com/articles/172748/how-to-delete-a-phoenix-table-created-on-top-of-ex...

4 REPLIES 4

Re: How to map a phoenix view/table with a different name to a Hbase table ?

"Basically, I don't want my Hbase table to be dropped when I drop the corresponding mapped Hbase Table." Is this a typo? I don't understand what your problem is.

Re: How to map a phoenix view/table with a different name to a Hbase table ?

I updated the question.

Re: How to map a phoenix view/table with a different name to a Hbase table ?

"How can this be achieved without any restart of Regionservers"

It cannot presently.

Re: How to map a phoenix view/table with a different name to a Hbase table ?

Hello @Josh Elser

One thing which we can do is map a Phoenix View instead of table and then dropping the view won't have any effect on the hbase table.

But I'm getting Table is read only error while performing the same activity. Can you help me out with the syntax please ?

I'm attaching my query and the hbase scan result :

CREATE SCHEMA IF NOT EXISTS "fnl";
use "fnl";
CREATE VIEW "voucherinvalidations"
(
rowkey VARCHAR primary key,
"cf"."HJMPTS" DECIMAL(20,0),
"cf"."CREATEDTS" TIMESTAMP,
"cf"."MODIFIEDTS" TIMESTAMP,
"cf"."TYPEPKSTRING" DECIMAL(20,0),
"cf"."OWNERPKSTRING" DECIMAL(20,0),
"cf"."PK" DECIMAL(20,0),
"cf"."P_CODE" VARCHAR(255),
"cf"."P_USER" DECIMAL(20,0),
"cf"."P_ORDER" VARCHAR(20,0),
"cf"."P_STATUS" VARCHAR(255),
"cf"."P_VOUCHER" DECIMAL(20,0),
"cf"."ACLTS" DECIMAL(20,0),
"cf"."PROPTS" DECIMAL(20,0)
);

hbase-scan.png