Creating Bucketed Tables

#1

Let us see how we can create Bucketed Tables in Hive.

  • Bucketed tables is nothing but Hash Partitioning in conventional databases.
  • We need to specify the CLUSTERED BY Clause as well as INTO BUCKETS to create Bucketed table.
USE training_retail;
CREATE TABLE orders_buck (
  order_id INT,
  order_date STRING,
  order_customer_id INT,
  order_status STRING
) CLUSTERED BY (order_id) INTO 8 BUCKETS;

Practice hive on state of the art Big Data cluster - https://labs.itversity.com
You can sign up for our courses on Udemy using $10 coupons - Udemy Coupons - Big Data Courses


0 Likes