This is the create command I am using to create the HBase-integrated table:
CREATE EXTERNAL TABLE CALLCOUNTBYGENDER(Id STRING, Hour STRING, Gender String, Count String)STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:Hour,cf1:Gender,cf1:Count")
TBLPROPERTIES ("hbase.table.name" = "hbase_cdr_summary_callcountbygender");
I am using the following hive statement to populate the above table:
INSERT OVERWRITE TABLE CALLCOUNTBYGENDER
FROM FACT f JOIN TimeofDayD tod on f.timeofdaykey=tod.timeofdaykey
JOIN SubscriberDemographicsD sd on f.SubscriberDemographicsKey=sd.SubscriberDemographicsKey
GROUP BY tod.hour,sd.SubscriberAgeGroup;
The table is getting populated correctly when I am viewing it in HBase, the third column 'Gender' is getting messed up. It is supposed to contain only male/female values but the Hour column values are also getting populated under Gender column. After repopulating the table again and again, it finally got populated correctly. I'm not sure what kind of a bug it is.