title: Hive exchange partition vs insert overwrite
body: <p>I am having 2 tables <code>src</code> and <code>dest</code>, same schema. I would like to overwrite partitions of <code>dest</code> using the updated data on <code>src</code> table.</p>
  
  <p>On hive there are 2 different statements:</p>
  
  <ol>
  <li><p>Insert Overwrite</p></li>
  <li><p>Exchange Partition</p></li>
  </ol>
  
  <p>for <code>exchange partition</code> it's problematic, because some of the partitions already exist.(as stated on documentation it is not possible to exchange if it is already exist). I also need support concurrency and atomicity, which means drop + exchange may not work but I am not sure about that.</p>
  
  <p>for <code>insert overwrite</code> it's problematic because it's take a lot of time (lot of data copied, there is not <strong>HOT swap</strong> for the partition). </p>
  
  <p>Is there any hybrid way to solve this issue ?  like <code>exchange overwrite</code>or something like that? Is there any plan to add that functionality to hive if it is not exist.</p>