You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by C Reid <re...@outlook.com> on 2017/12/26 08:46:50 UTC

Create views on existing HBase namespace(not default) tables

Hi all,


I created a table from client code, and want to make queries through Phoenix.


Every thing works well, verified by "select *" statement, when table is in 'default' namespace, no matter using

"create view "testKerberosCode" (pk VARCHAR PRIMARY KEY, "k"."" VARCHAR);"

or

"create table "testKerberosCode" (pk VARCHAR PRIMARY KEY, "k"."" VARCHAR);"


But when i created table in another namespace called 'reid', using

"create view "reid"."testKerberosCode" (pk VARCHAR PRIMARY KEY, "k"."" VARCHAR);" causes Error: ERROR 505 (42000): Table is read only. (state=42000,code=505); using

"create table "reid"."testKerberosCode" (pk VARCHAR PRIMARY KEY, "k"."" VARCHAR);" causes nothing, but "select *" shows empty.

I also tried method in this link: https://community.hortonworks.com/questions/65172/views-on-existing-hbase-namespace-tables.html, and result of "select *" is empty...


Any hint is highly appreciated.


Best regards,

R.C

[https://dataworkssummit.com/wp-content/uploads/2017/11/HCC-Banner-Ad.jpg]<https://community.hortonworks.com/questions/65172/views-on-existing-hbase-namespace-tables.html>

Views on existing HBase namespace tables - Hortonworks<https://community.hortonworks.com/questions/65172/views-on-existing-hbase-namespace-tables.html>
community.hortonworks.com
First you can map the table created in HBase to Phoenix with create table query as mentioned in "Mapping to an Existing HBase Table" at phoenix.apache.org and then ...




Phoenix version i'm using is phoenix-4.11.0-HBase-1.2



Re: Create views on existing HBase namespace(not default) tables

Posted by Reid Chan <re...@outlook.com>.
I upgraded to the most recent version 4.13. It works now.



--
Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/