Database Reference
In-Depth Information
It is often necessary to join one or more Hive tables based on one or more columns.
The following example provides the mechanism to join the customer table with
another table, orders , which stores the details about the customer's orders.
Instead of placing all the customer details in the order table, only the
corresponding cust_id appears in the orders table.
hive> select o.order_number, o.order_date, c.*
from orders o inner join customer c
on o.cust_id = c.cust_id
where c.email_address = 'mary.jones@isp.com';
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input
data size: 1
Starting Job = job_1394125045435_0002, Tracking URL =
http://pivhdsne:8088/proxy/application_1394125045435_0002/
Kill Command = /usr/lib/gphd/hadoop/bin/hadoop job
-kill job_1394125045435_0002
Hadoop job information for Stage-1: number of mappers: 2;
number of reducers: 1
2014-03-06 13:26:20,277 Stage-1 map = 0%, reduce = 0%
2014-03-06 13:26:42,568 Stage-1 map = 50%, reduce = 0%,
Cumulative CPU 4.23 sec
2014-03-06 13:26:43,637 Stage-1 map = 100%,reduce = 0%,
Cumulative CPU 4.79 sec
2014-03-06 13:26:52,658 Stage-1 map = 100%,reduce = 100%,
Cumulative CPU 7.07 sec
MapReduce Total cumulative CPU time: 7 seconds 70 msec
Ended Job = job_1394125045435_0002
MapReduce Jobs Launched:
Job 0: Map: 2 Reduce: 1 Cumulative CPU: 7.07 sec HDFS Read:
602
HDFS Write: 140 SUCCESS
Total MapReduce CPU Time Spent: 7 seconds 70 msec
OK
X234825811 2013-11-15 17:08:43 34567678 Mary Jones
mary.jones@isp.com
Search WWH ::




Custom Search