How should I go about creating and loading a bunch of lookup tables on HBASE? These are the typical RDBMS kind of data - where the data is row-oriented. All the data is coming from a flat file that's again row-oriented. How best can I load this data into HBASE? I first created the table in Hive, mapped to the HBase table:
CREATE TABLE CITY_CTR_SLS ( id string, CUST_CITY_ID INT, CALL_CTR_ID INT, TOT_DOLLAR_SALES FLOAT, TOT_UNIT_SALES FLOAT, TOT_COST FLOAT) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ( "hbase.columns.mapping" = ":key,ints:CUST_CITY_ID,ints:CALL_CTR_ID,floats:TOT_DOLLAR_SALES,floats:TOT_UNIT_SALES,floats:TOT_COST" ) TBLPROPERTIES("hbase.table.name" = "hbase_CITY_CTR_SLS1");
When I run the following command to load data into the hive table, I get an error about mismatched columns(because of the additional ID column for hbase that's needed:
[ash-r101-14l.mstrprime.com:21000] > INSERT INTO CITY_CTR_SLS select * from wh2.CITY_CTR_SLS; ...................................(wh2.city_ctr_sls already exists)
Query: insert INTO CITY_CTR_SLS select * from wh2.CITY_CTR_SLS
ERROR: AnalysisException: Target table 'hbase_temp.city_ctr_sls' has more columns (6) than the SELECT / VALUES clause returns (5)
On Mon, May 18, 2015 at 3:33 PM, Omer, Farah <[EMAIL PROTECTED]> wrote:
NEW: Monitor These Apps!
Apache Lucene, Apache Solr and all other Apache Software Foundation project and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext