title: How to convert rdd object to dataframe in Scala
body: <p>I read data from ElasticSearch and save into an RDD.</p>
  
  <pre><code>val es_rdd = sc.esRDD("indexname/typename",query="?q=*")
  </code></pre>
  
  <p>The rdd has the next example data:</p>
  
  <pre><code>(uniqueId,Map(field -&gt; value))
  (uniqueId2,Map(field2 -&gt; value2))
  </code></pre>
  
  <p>How can I convert this RDD (String, Map to a Dataframe (String, String, String)?</p>