Hive static partitions and dynamic partitions

If you want to use a static partition in Hive, you should set the property as follows:

set hive.mapred.mode = strict;  

In the preceding example, we have seen that we have to insert each monthly order file to each static partition individually. Static partition saves time in loading data compared to dynamic partition. We have to individually add a partition to the table and move the file into the partition of the table. If we have a lot partitions, writing a query to load data in each partition may become cumbersome. We can overcome this with a dynamic partition. In dynamic partitions, we can insert data into a partition table with a single SQL statement but still load data in each partition. Dynamic ...

Get Modern Big Data Processing with Hadoop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.