Hive - HiveQL

Card Puncher Data Processing

Documentation / Reference

Cheetsheet

Show / Describe

SHOW TABLES;
SHOW FUNCTIONS;
DESCRIBE FUNCTION <function_name>;
DESCRIBE FUNCTION EXTENDED <function_name>;
set; -- all
SET hive.execution.engine; -- one

Table

CREATE TABLE page_view(viewTime INT, userid BIGINT,
                page_url STRING, referrer_url STRING,
                ip STRING COMMENT 'IP Address of the User')
COMMENT 'This is the page view table'
PARTITIONED BY(dt STRING, country STRING)
CLUSTERED BY(userid) SORTED BY(viewTime) INTO 32 BUCKETS
ROW FORMAT DELIMITED
        FIELDS TERMINATED BY '1'
        COLLECTION ITEMS TERMINATED BY '2'
        MAP KEYS TERMINATED BY '3'
STORED AS SEQUENCEFILE;

where: clustered = Hive - Bucket (Cluster)





Discover More
Card Puncher Data Processing
Hive - Engine

The SQL Processing engine of hive SQL query are converted to a physical operator tree which is optimized and converted to the underlining engine via the calcite engine. Most of the existing query optimizations...
Tez Hive Query Diagnostic
Hive - Query (SELECT)

in Hive. The SQL language of Hive is called hiveql. ...
Card Puncher Data Processing
Hive - Syntax

All Hive commands require a semi-colon as a terminator. See also:
Sql Hive Arch
Spark - Hive

Hive is the default Spark catalog. Since Spark 2.0, Spark SQL supports builtin Hive features such as: HiveQL Hive SerDes UDFs read...
Card Puncher Data Processing
Spark Sql - Grammar

Sql Grammar in a Spark Context hive ql for sql Built-in functions



Share this page:
Follow us:
Task Runner