Skip to content
BENIBIX Learn

Apache Hive

Data⚙️ ProcessingDistributed Processing

Also known as Hive, HiveQL

A tool that puts SQL on top of Hadoop files.

Think of it like

It is like a helper who hears one plain ask. Then they turn it into a list of jobs for lots of workers.

Example

An analyst writes one SELECT in Hive. Hive turns it into jobs that read 2 TB of log files on 50 machines.

Why it matters

It showed that people will use big data if they can ask in SQL. Its Metastore is still the table list many lake tools read.

Definition

Apache Hive is a free tool that lets people ask questions of Hadoop files in SQL. It began at Facebook and was opened to all in 2008. It turns each query into jobs that run across the cluster. It reads the files where they sit. It keeps a list of tables and their columns, called the Hive Metastore. Newer engines are faster, but that list lives on.

Example code

sql
CREATE EXTERNAL TABLE logs (ts STRING, page STRING)
STORED AS PARQUET
LOCATION 'hdfs:///data/logs/';
A Hive table over files that already exist. Dropping the table leaves the files where they are.

Common mistake

Expecting quick answers. A classic Hive query takes minutes, because each one starts a batch of jobs.

Key takeaways

  1. 1
    SQL in. People write plain SQL.
  2. 2
    Jobs out. Hive turns it into cluster jobs.
  3. 3
    A table list. The Metastore names every table.