Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to create View in Phoenix to connect to existing tables in Hbase?

Solved Go to solution

How to create View in Phoenix to connect to existing tables in Hbase?

Explorer

In my previous tables in Hbase, each column family has many qualifier: values pairs. When I try to create a view in Phoenix, no values shown in these columns. How to create a view to map all schema in my exsiting tables?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to create View in Phoenix to connect to existing tables in Hbase?

Guru

You have to explicitly list of column names in the CREATE TABLE statement, or you can use dynamic columns at the query time to specify the list of columns for this query.

3 REPLIES 3

Re: How to create View in Phoenix to connect to existing tables in Hbase?

Guru

You have to explicitly list of column names in the CREATE TABLE statement, or you can use dynamic columns at the query time to specify the list of columns for this query.

Highlighted

Re: How to create View in Phoenix to connect to existing tables in Hbase?

As Enis said and for details you can look on below page:-

https://phoenix.apache.org/faq.html

Re: How to create View in Phoenix to connect to existing tables in Hbase?

Guru

Lets say you have an existing HBase table called "transactions", column family called "transactions" that has a column called transactionId. You can map that table to a Phoenix view with: CREATE VIEW "TransactionHistory" (k VARCHAR primary key, "Transactions"."transactionId" VARCHAR);. Now you should be able to Select "transactionId" from "Transactions". You can use ALTER VIEW to add additional columns from he HBASE table after that.

Don't have an account?
Coming from Hortonworks? Activate your account here