Simple SQL-style data querying using Apache Hive
We can query the datasets that have been mapped to Hive tables using HiveQL, which is similar to SQL. These queries can be simple data-exploration operations such as counts, orderby, and group by
as well as complex joins, summarizations, and analytic operations. In this recipe, we'll explore simple data exploration Hive queries. The subsequent recipes in this chapter will present some of the advanced querying use cases.
Getting ready
Install Hive and follow the earlier Creating databases and tables using Hive CLI recipe.
How to do it...
This section demonstrates how to perform a simple SQL-style query using Hive.
- Start Hive by issuing the following command:
$ hive
- Issue the following query in the Hive ...
Get Hadoop MapReduce v2 Cookbook - Second Edition 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.