Professional Documents
Culture Documents
Lecture 28.2 28.3 Part 1 Impala To HBASE
Lecture 28.2 28.3 Part 1 Impala To HBASE
------------------
txtno, ymd, custno, amount, category, product, city, state, spentby
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES
("hbase.columns.mapping"="
:
key,details:ymd,details:custno,details:amount,details:category,details:product,deta
ils:city,details:state,details:spentby")
TBLPROPERTIES ("hbase.table.name"="transactions_hbase");
Step 2: Verify whether the table(s) is created in HIVE and HBase from their
corresponding shells.
-----------------------------------------------------------------------------------
--------------
Step 3: Load the transactions data from HDFS into the HBase table created
-------------------------------------------------------------------------
hbase org.apache.hadoop.hbase.mapreduce.ImportTsv '-Dimporttsv.separator=,'
-Dimporttsv.columns=HBASE_ROW_KEY,details:ymd,details:custno,details:amount,details
:category,details:product,details:city,details:state,details:spentby
transactions_hbase /user/training/transactions_data.txt;
Step 4: Check whether the data got properly loaded into both HIVE and HBase tables.
-----------------------------------------------------------------------------------