Chapter 4. Data Selection and Scope

This chapter is about how to discover the data by querying the data, linking the data, and limiting the data ranges or scopes. The chapter mainly covers the syntax and usage of Hive SELECT, WHERE, LIMIT, JOIN, and UNION ALL to operate datasets.

In this chapter we will cover the following topics:

  • The SELECT statement
  • The common JOIN statement
  • The special JOIN (MAPJOIN) statement
  • The set operation statement (UNION ALL)

The SELECT statement

The most common use case of using Hive is to query the data in Hadoop. To achieve this, we need to write and execute the SELECT statement in Hive. The typical work done by the SELECT statement is to project the rows meeting query conditions specified in the WHERE clause after the target ...

Get Apache Hive Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.