Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

HiveQL

HiveQL - Query language

< >

HiveQL is a query language created in 2011.

#1034on PLDB 12Years Old 201Users
0Books 0Papers 502Repos

SQL-like query language interface called the Hive query language. While based on SQL, HiveQL does not strictly follow the full SQL-92 standard. Internally, a compiler translates HiveQL statements into a directed acyclic graph of MapReduce, Tez, or Spark jobs, which are submitted to Hadoop for execution.


Example from the web:
4 CREATE TABLE word_counts AS 5 SELECT word, count(1) AS count FROM 6 (SELECT explode(split(line, '\s')) AS word FROM docs) temp 7 GROUP BY word 8 ORDER BY word;
Example from Linguist:
set hive.mapred.mode=nonstrict; set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; -- SORT_QUERY_RESULTS create table nzhang_t1 like srcpart; create table nzhang_t2 like srcpart; FROM srcpart INSERT OVERWRITE TABLE nzhang_t1 PARTITION (ds, hr) SELECT key, value, ds, hr WHERE ds = '2008-04-08' AND hr = '11' INSERT OVERWRITE TABLE nzhang_t2 PARTITION (ds, hr) SELECT key, value, ds, hr WHERE ds = '2008-04-08' and hr = '12' GROUP BY key, value, ds, hr; show partitions nzhang_t1; show partitions nzhang_t2; select * from nzhang_t1; select * from nzhang_t2;

Language features

Feature Supported Token Example
Comments
-- A comment
Line Comments --
-- A comment
Semantic Indentation X
revolution-programming-language.html · hiveql.html · bloop.html

View source

- Build the next great programming language · Search · Day 212 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com