Hive-Hands On - Bucketing Table
Hive-Hands On - Bucketing Table
use hive_bucket;
set hive.cli.print.header=true;
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.mapred.mode=nonstrict;
create table bucket1 (transaction_id string, cust_id int, tran_date string, Qty
int, Rate int, Tax double, total_amt double, Store_type string) clustered by
(cust_id) into 3 buckets row format delimited fields terminated by ',' lines
terminated by '\n' stored as ORC tblproperties("orc.compress"="Zlib",
"skip.header.line.count"="1");
set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DBTxnManager;
set hive.support.concurrency=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.compactor.initiator.on=true;
set hive.compactor.worker.threads=1;