If you have an existing table, you need to create a view to access it:
create view "http_access_log_v" (pk VARCHAR PRIMARY KEY, "colfam1"."colum1" VARCHAR, "colfam1"."colum2" VARCHAR) as select * from "http_access_log";
With the above view, you can make a choice against it as follows:
select * from http_access_log_v;
Example
Say I had a HBase configuration table. I can not make a choice directly against this table through Phoenix.
sqlline> select * from "config";
Error: ERROR 1012 (42M03): Table undefined. tableName=config (state=42M03,code=1012)
, select * from "config" HBase:
sqlline> create view "config-data" (pk VARCHAR PRIMARY KEY, "data"."id" VARCHAR, "data"."categoryName" VARCHAR) as select * from "config";
No rows affected (1.588 seconds)
, Phoenix SQL:
sqlline> select * from "config-data";
+------------------------------------------+------------------------------------------+------------------------------------------+
| PK | id | categoryName |
+------------------------------------------+------------------------------------------+------------------------------------------+
| QA-AA00|D|MC|MSG|C10|M3 | null | null |
| QA-AA00|D|MC|MSG|C2|M1 | null | null |
...
HBase:
sqlline> select * from "config"; Error: ERROR 1012 (42M03): Table undefined. tableName=config (state=42M03,code=1012)