Apr 24, 2020 in Big Data | Hadoop
Bucketing in Dynamic Partition

Step 1:

hive> set hive.enforce.bucketing=true;
hive> set hive.exec.dynamic.partition.node=nonstrict;

Step 2: Create a partition table and buckets inside that,

hive> create table partition_table(id int,lastname string) partitioned by(firstname string) clustered by (id) into 5 buckets row format delimited fields terminated by ',';

Step 3: Insert data into the partition table.

 hive> insert into partition_table partition (firstname) select id,lastname.firstname from table1;
 select * from partition_table;

Step 4: You can see the partition in the UI.

Related questions

0 votes
Apr 24, 2020 in Big Data | Hadoop