Company
Date Published
Author
Matt Kalan
Word count
906
Language
English
Hacker News points
None

Summary

Hive is a data warehousing and SQL-like query language used in conjunction with Hadoop, a popular big data processing framework. In this example, Hive is used to create two tables: `minute_bars` and `five_minute_bars`, which are populated from a MongoDB database. The tables are created using Hive's SQL-like syntax, and the mapping between the fields is handled through the `mongo.columns.mapping` property. The query that aggregates 1-minute intervals of stock prices into 5-minute intervals uses windowing functions to group the data and calculate the OHLC (open, high, low, close) values for each 5-minute period. The query takes advantage of MongoDB's dynamic schema and SQL-like querying capabilities, allowing users to access data in a variety of formats with the same commands.