Book Image

Apache Hive Cookbook

Book Image

Apache Hive Cookbook

Overview of this book

Hive was developed by Facebook and later open sourced in Apache community. Hive provides SQL like interface to run queries on Big Data frameworks. Hive provides SQL like syntax also called as HiveQL that includes all SQL capabilities like analytical functions which are the need of the hour in today’s Big Data world. This book provides you easy installation steps with different types of metastores supported by Hive. This book has simple and easy to learn recipes for configuring Hive clients and services. You would also learn different Hive optimizations including Partitions and Bucketing. The book also covers the source code explanation of latest Hive version. Hive Query Language is being used by other frameworks including spark. Towards the end you will cover integration of Hive with these frameworks.
Table of Contents (19 chapters)
Apache Hive Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Using a left/right/full outer join


In this recipe, you will learn how to use left, right and full outer joins in Hive.

In Hive, left/right/full outer joins behave in the same manner as in relation to RDBMS. For a left outer join, all the rows from the table on the left are displayed and the matching rows from the right. All the unmatched rows from the table on the right will be dropped and Null will be displayed. A right outer join is just the reverse of a left outer join.

The left outer join is as follows:

Left join in Hive

A right outer join behaves the opposite to a left outer join. In this join, all the rows from the right table and the matching rows from the left table are displayed. All the unmatched rows from the table on the left will be dropped and Null will be displayed.

A right outer join is as follows:

Right join in Hive

In a full outer join, all the rows will be displayed from both the tables. A full outer join combines the result of the left outer join and the right outer join.

A full...