Apache Hive put SQL on top of Hadoop. Instead of writing MapReduce jobs in Java, analysts could write HiveQL - a SQL dialect - and Hive would compile it into distributed jobs that ran over files in HDFS. Its lasting contribution is the idea of a schema on read: the data stays as files, and a metadata catalog describes how to interpret them as tables. That catalog, the Hive Metastore, became infrastructure the whole ecosystem depends on.
Tables over files
A Hive table is a directory of files plus a definition of their columns, types, and partitioning. Hive reads the schema when you query, not when you write, so the same files can back several table definitions and loading data is just copying files into the right directory. Partitioning by a column like date stores each partition in its own subdirectory, so a query filtered on that column scans only the relevant files.
CREATE TABLE events (user_id BIGINT, action STRING)
PARTITIONED BY (dt STRING)
STORED AS PARQUET;
SELECT action, COUNT(*) FROM events
WHERE dt = '2026-06-16' GROUP BY action;
The Hive Metastore
The Metastore is a relational database (often MySQL or Postgres) that stores table definitions, partition locations, and column statistics. Its reach goes far beyond Hive itself - Spark, Presto/Trino, and Flink all read the Hive Metastore to discover tables in a data lake. Even where Hive's execution engine is no longer used, its catalog often still is.
Execution and where it fits
Early Hive compiled to MapReduce, which made it reliable but slow for interactive use; later versions added the Tez and Spark execution engines and vectorized reading to close the gap. Today Hive is best understood as the batch-SQL and metadata layer of the Hadoop world. For fast interactive queries over the same data, teams usually point Presto or Trino at the same Metastore.
Frequently asked questions
What is schema on read? The data is stored as raw files and the schema is applied at query time, so loading is just placing files and one dataset can support multiple table definitions.
Why does the Hive Metastore matter beyond Hive? It is the de-facto table catalog for data lakes - Spark, Presto/Trino, and Flink all use it to find tables and partitions, even without Hive's query engine.
Is Hive good for interactive queries? It is built for batch SQL; for low-latency interactive analytics over the same files, Presto or Trino against the shared Metastore is the usual choice.