Apache Hive Partitions

This is a collection of articles that published in this blog that explain how to create, add, alter, rename and drop the data partitioning in Hive.

Partitioning in Apache Hive

Data in Apache Hive is classified as Table, Partition, or Bucket. Hadoop is often designed to handle massive datasets, thus tables will contain massive amounts of data. Partitioning is a method of organizing tables by dividing them into smaller portions based on partition keys, which are fundamental factors in defining how data is kept in…

Overwriting Partitioned Data in Hive

Earlier posts on this site addressed the most of the use cases for Hive Partitioning. There will always be some questions when it comes to implementation and new types of needs. In this post, we’ll go through how to replace existing partitioned data in HDFS subdirectories that have already been created. Syntax for Static Partitioning: …

Adding Partition To Table – Hive

Tables in Apache Hive are partitioned similarly to SQL. Partitioning is a method of dividing a table into chunks based on the values of particular columns. In comparison, creating and managing partitions in Hive is much easier. Partitions are typically specified when a table is created; however, in this post, we will explain how to…

Renaming a Partition – Hive

Tables in Apache Hive are partitioned similarly to SQL. Partitioning is a method of dividing a table into chunks based on the values of particular columns. In comparison, creating and managing partitions in Hive is much easier. Partitions are typically specified when a table is created; however, in this post, we will explain how to…

Deleting the Table Partition – Hive

In earlier articles, we covered how to create, rename, and add Hive table partitions. This post will go through how to remove a table partition. Syntax: ALTER TABLE table_name DROP PARTITION partition_specifaction; Example: ALTER TABLE CitiesList DROP PARTITION(Country=’UAE’); For detailed information about partitions, please click here. Examples for Static Partitions, click here. Examples for Dynamic…

Static Partitions in Hive

For detailed information about “Static Partitions” please click here. In this lesson, we’ll see how to create the static partition. Consider the below data for the exercise. You can download the files from here. Data sample is given here. File: UK_Cities.txt1     Aberdeen               UK2     Armagh       …

Dynamic Partitions in Hive

For detailed information about “Dynamic Partitions” please click here. In this lesson, we’ll see how to create the dynamic partition. Consider the below data for the exercise. You can download the file from here (Credits to Paul Stenning). Town    County     Country     Beaminster   Dorset   England   Blandford Forum   Dorset  …

SQL Server Partitions vs Hive Partitions

Partitioning is a way of separating tables into smaller chunks based on partition keys. Partitions, in other terms, are horizontal data slices that allow large quantities of data to be split into more manageable parts. These keys are important in determining how data is stored in the table. Partitioning is crucial in Apache Hive since…

6 comments

  1. Время ответа на запрос не критично(так как hive работает на основе MapReduce — интерактивности ждать не стоит). Youtube-Канал автора об анализе данных Ссылки на предыдущие статьи цикла: » Big Data от А до Я. Часть 1: Принципы работы с большими данными, парадигма MapReduce » Big Data от А до Я. Часть 2: Hadoop » Big Data от А до Я. Часть 3: Приемы и стратегии разработки MapReduce-приложений » Big Data от А до Я. Часть 4: Hbase

    Like

    1. I spend a lot of time writing blog posts and frequently forget to express gratitude to my readers and followers. Your feedback is really valuable to me. Thanks a lot.

      Like

  2. Having read this I thought it was very informative. I appreciate you spending some time and energy to put this informative article together. I once again find myself personally spending a significant amount of time both reading and leaving comments. But so what, it was still worthwhile!

    Like

    1. I spend a lot of time writing blog posts and frequently forget to express gratitude to my readers and followers. Your feedback is really valuable to me. Thanks a lot.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s