Using HBase to store data and Apache Pheonix as client to query, I found the output is weird.
Step 1: Load data to HBase
I load data from a DB to HBase using this format
Column Name | Column Family |
---|---|
usr_id | cf1 |
obj_id | cf2 |
Class_Name | cf3 |
Course_Mode | cf4 |
Step 2. Query Data from HBase using Pheonix
From Pheonix documentation, it is stated that we cannot directly query from existing HBase table but can create view on top of the existing table. Then, from created view, we can query from it.
So, I did as
CREATE VIEW "existing_table" ( pk VARCHAR PRIMARY KEY, "cf1".VAL VARCHAR, "cf2".VAL VARCHAR, "cf3".VAL VARCHAR, "cf4".VAL VARCHAR );
The return output of the view is as below image which only “pk” column return all the column while other columns are null?
My question is which part of the steps I did incorrectly? And what to be rectify?