...
In the dynamic partition inserts, users can give partial partition specifications, which means just specifying the list of partition column names in the PARTITION clause. The column values are optional. If a partition column value is given, we call this a static partition, otherwise it is a dynamic partition. Each dynamic partition column has a corresponding input column from the select statement. This means that the dynamic partition creation is determined by the value of the input column. The dynamic partition columns must be specified last among the columns in the SELECT statement and in the same order in which they appear in the PARTITION() clause.
Dynamic Partition partition inserts are disabled by defaultdefault prior to Hive 0.9.0 and enabled by default in Hive 0.9.0 and later. These are the relevant configuration properties for dynamic partition inserts:
Configuration property | Default | Note |
---|---|---|
|
| Needs to be set to |
|
| In |
| 100 | Maximum number of dynamic partitions allowed to be created in each mapper/reducer node |
| 1000 | Maximum number of dynamic partitions allowed to be created in total |
| 100000 | Maximum number of HDFS files created by all mappers/reducers in a MapReduce job |
|
| Whether to throw an exception if dynamic partition insert generates empty results |
...