title: How to get rdd after run rdd.map function on Spark (How to use rdd.insertInto)
body: <p>I am using spark to process data. But I don't know how to save new data to Hive</p>
  
  <p>I load rdd from Hive then run map function to cleanup the data.</p>
  
  <pre><code>result = myRdd.map(lambda x: cleanup(x))
  </code></pre>
  
  <p>I want to save the result to new table in Hive. so I use</p>
  
  <pre><code>result.insertInto("newTable", True)
  </code></pre>
  
  <p>I get the Error: <code>'PipelinedRDD' object has no attribute 'insertInto'</code></p>
  
  <p>How do I convert result to rdd to use <code>insertInto</code> function? I also want to know there is other way to do this task?</p>