I have existing HBase tables for which I build Phoenix Views.
CREATE VIEW "MDS" (pk VARCHAR PRIMARY KEY, "auth_group"."id" VARCHAR, "auth_group"."name" CHAR(10));
where MDS is my hbase table, auth_group is one of the column families with columns id, name.
I have the below questions:
1. Can I use one of the columns in my column family as a PRIMARY KEY? Or should it something outside of the columns in the column family? How do I build a PRIMARY KEY in such a scenario.
2. When I did the below it gave me the below error. How do I choose the length of CHAR?
select * from MDS;
Error: ERROR 201 (22000): Illegal data. Expected length of at least 12 bytes, but had 10 (state=22000,code=201)
3. If I picked the min of the CHAR to some minimum number, I get the below result where the characters are cut off(based on the number I gave) and the id column is blank . (It doesn't reflect the same values as in hbase.)
PK | id | name |
1 | | resource_u |
2 | | adminid_id |
3 | | systems_id |
4 | | usersystem |
5 | | uaccess_id |
6 | | numofusers |
7 | | idofusersac |