Hive Partitioning Configuration
You can set partitioning configuration in 2 ways
1) hive-site.xml
2) Hive shell
Partitioning Table Syntax
Please share this blog post and follow me for latest updates on
You can set partitioning configuration in 2 ways
1) hive-site.xml
hive-site.xml
<property> <name>hive.exec.dynamic.partition</name> <value>true</value> <description>Whether or not to allow dynamic partitions in DML/DDL.</description> </property> <property> <name>hive.exec.dynamic.partition.mode</name> <value>nonstrict</value> <description> In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions. In nonstrict mode all partitions are allowed to be dynamic. </description> </property> <property> <name>hive.exec.max.dynamic.partitions</name> <value>1000</value> <description>Maximum number of dynamic partitions allowed to be created in total.</description> </property> <property> <name>hive.exec.max.dynamic.partitions.pernode</name> <value>1000</value> <description>Maximum number of dynamic partitions allowed to be created in each mapper/reducer node.</description> </property>
$ hive
set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; set hive.exec.max.dynamic.partitions=1000; set hive.exec.max.dynamic.partitions.pernode=1000;
CREATE [EXTERNAL] TABLE table_name (col_name_1 data_type_1, ....) PARTITIONED BY (col_name_n data_type_n [COMMENT col_comment], ...);
Comments
Post a Comment