Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Join two tables in Hbase

Problem:

I am new to Hbase and I came across a situation where I need to join two tables.
Let us suppose I have Employee table and Department table both are created in Hbase. By reading Hbase in action , I got to know that we cannot join tables in Hbase.

Solution:

I found out a solution that by writing MapReduce Code using Hbase classes and Interfaces we can achieve this task.

Also if someone can help me with the coding that would be very helpful

like image 284
user3782364 Avatar asked Aug 31 '14 05:08

user3782364


2 Answers

You should look at this jira issue in apache. You should use MultiTableInputFormat. https://issues.apache.org/jira/browse/HBASE-3996

See also: how to join tables in hbase

like image 84
Mohammed Niaz Avatar answered Oct 23 '22 04:10

Mohammed Niaz


The easiest way would be to load your HBase tables into Hive or Impala and perform a SQL join with those tools.

like image 38
Santiago Cepas Avatar answered Oct 23 '22 02:10

Santiago Cepas