0

Look at the scripts, hive buckets are not creating after partitioning table,

step 1.
create table orders_bucket9
(order_id int,order_date string,order_customer_id int,order_status string) 
partitioned by (order_month string) 
clustered by (order_status) into 4 buckets
row format delimited
fields terminated by ',';

step 2.
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.dynamic.partition=true;
set hive.enforce.buckting=true;
step 3.
insert into table orders_bucket9 partition(order_month) select                order_id,order_date,order_customer_id,order_status,substr(order_date,1,7) order_month from orders;

when i partitioned the table on bases of order_month the partitioning is getting created but buckting is not???

Kumar
  • 1
  • 4
  • Can you check the output of what is shown when you do "describe formatted " You can find out on which column bucketing and partitioning is done. – Deepan Ram Mar 20 '17 at 15:28
  • only partition is showing on order_month... – Kumar Mar 20 '17 at 15:56
  • Varun : Bucket info is shown in the **Bucket Columns** row. I executed your query and found out that the bucketing is done on the [order_status] column. – Deepan Ram Mar 21 '17 at 10:09
  • Deepan: when I am loading data from insert command the buckets in hdfs location is not creating all the data is loading different set of partitioned table on order_month, but not buckets??? – Kumar Mar 21 '17 at 13:51

0 Answers0