title: How Spark performs write operation to Hive
body: <p>I am working in Spark and still new to it. I am working on a job that reads data from some source, do some transformations and write to Hive.</p>
  <p>For writing to Hive, I am doing <code>dataframe.write.insertInto(hive_table)</code></p>
  <p>My question is how does Spark write the entire <code>dataframe</code> to Hive? Will it write in parallel like different partitions on different executors will be written in parallel or will it collect all the data from various partitions to driver and then try to insert in one go?</p>