Hive SQL - DDL

Hive SQL DDL (Data Definition Language) tutorials. This series provides examples about how to create Hive databases, tables (incl. managed and external), views, etc.  

Hive SQL - DDL

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 258
thumb_up 0
access_time 4 months ago

This page shows how to create a temporary Hive table via Hive SQL (HQL). Example: CREATE TEMPORARY TABLE temp_customer (`cust_id` int, `name` string,`created_date` date) STORED AS PARQUET; Temporary Hive tables are only visible to the creation session and will be deleted automatically when ...

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 87
thumb_up 0
access_time 4 months ago

This page shows how to create a managed(internal) Hive table from a SELECT statement via Hive SQL (HQL). Example: CREATE TABLE IF NOT EXISTS hql.transactions_copy STORED AS PARQUET AS SELECT * FROM hql.transactions; A MapReduce job will be submitted to create the table from SELECT statement.

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 24
thumb_up 0
access_time 4 months ago

This page shows how to create bucketed sorted Hive tables via Hive SQL (HQL). CLUSTERD BY is used to create bucketed table Example: CREATE TABLE IF NOT EXISTS hql.transactions_bucketed(txn_id BIGINT, cust_id INT, amount DECIMAL(20,2),txn_type STRING, created_date DATE) COMMENT 'A table to ...

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 138
thumb_up 0
access_time 4 months ago

This page shows how to create partitioned Hive tables via Hive SQL (HQL). Example: CREATE TABLE IF NOT EXISTS hql.transactions(txn_id BIGINT, cust_id INT, amount DECIMAL(20,2),txn_type STRING, created_date DATE) COMMENT 'A table to store transactions' PARTITIONED BY (txn_date DATE) STORED AS ...

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 347
thumb_up 0
access_time 4 months ago

This page shows how to create Hive tables with storage file format as CSV or TSV via Hive SQL (HQL). Example: CREATE TABLE IF NOT EXISTS hql.customer_csv(cust_id INT, name STRING, created_date DATE) COMMENT 'A table to store customer records.' ROW FORMAT SERDE ...

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 177
thumb_up 1
access_time 4 months ago

This page shows how to create Hive tables with storage file format as Parquet, Orc and Avro via Hive SQL (HQL). The following examples show you how to create managed tables and similar syntax can be applied to create external tables if Parquet, Orc or Avro format already exist in HDFS. Example ...

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 375
thumb_up 0
access_time 4 months ago

This page shows how to create, drop, and truncate Hive tables via Hive SQL (HQL). Refer to  Differences between Hive External and Internal (Managed) Tables to understand the differences between managed and unmanaged tables in Hive.  Example: CREATE TABLE IF NOT EXISTS ...

local_offer hive local_offer SQL local_offer hive-sql-ddl

visibility 56
thumb_up 0
access_time 3 months ago

This page shows how to create, drop, alter and use Hive databases via Hive SQL (HQL). CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name [COMMENT database_comment] [LOCATION hdfs_path] [MANAGEDLOCATION hdfs_path] [WITH DBPROPERTIES (property_name=property_value, ...)]; LOCATION is ...

Read more

Find more tags on tag cloud.

launch Tag cloud