Question: how bucketing works in hive?
Answer: The Bucketing concept is based on Hash function, which depends on the type of the bucketing column. Records which are bucketed by the same column will always be saved in the same bucket. Here, CLUSTERED BY clause is used to divide the table into buckets. In Hive Partition, each partition will be created as directory.