Create Partitioned Hive Table

Raymond Tang Raymond Tang 0 524 0.41 index 12/23/2021

This page shows you how to create partitioned hive table that uses parquet as storage format.

Code snippet

use test_db;
CREATE TABLE p_table(attr_1 INT, attr_2 STRING)
PARTITIONED BY (attr_3 INT)
STORED AS PARQUET;

The above SQL scripts create a partitioned table named p_tableand it is partitioned by column attr_3. The data is stored as parquet format.

hive parquet sql

Join the Discussion

View or add your thoughts below

Comments