Hue provides a simple SQL interface to create and manipulate SQL tables that are stored
in HBase, and define and
manipulate
views on HBase tables using Apache Phoenix in addition to HBase shell and database
API.
Cloudera does not
recommend manipulating Phoenix tables from HBase as this can lead to data loss.
The SQL connector is shipped with Hue so that you do not have to download and configure it
yourself.
Following are some examples to create and manipulate the Phoenix SQL tables from the Hue
editor:
Creating a table
CREATE TABLE IF NOT EXISTS Company (company_id INTEGER PRIMARY KEY, name VARCHAR(225));
Upserting values in the table
UPSERT INTO Company VALUES(1, 'Cloudera');
UPSERT INTO Company VALUES(2, 'Apache');