title: What is the difference between dynamic.partition=True and dynamic.partition.mode = nonstrict?
body: <p>Spark 2.0 - pyspark</p>
  
  <p>I seen the following 2 properties paired. What is the difference between them? </p>
  
  <pre><code> hive&gt; SET hive.exec.dynamic.partition=true;
   hive&gt; SET hive.exec.dynamic.partition.mode=non-strict;
  </code></pre>
  
  <p>I know what the outcome is when they are used - you can use dynamic partitioning to load/create multiple partitions, but I don't know the difference between these two similar commands.</p>
  
  <p>When I was running this code</p>
  
  <pre><code>input_field_names=['id','code','num']
  df \
  .select(input_field_names) \
  .write \
  .mode('append')\
  .insertInto('test_insert_into_partition')
  </code></pre>
  
  <p>I got an error message that says <code>Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict</code></p>
  
  <p>Using <code>spark.sql("SET hive.exec.dynamic.partition.mode = nonstrict")</code> the code works. It doesn't require me to use the other one.</p>
  
  <p>Why don't I need to set <code>SET hive.exec.dynamic.partition=true;</code> and what else should I know to choose which one to use.</p>