<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Weird error while converting RDD[CaseClass] to DataFrames in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Weird-error-while-converting-RDD-CaseClass-to-DataFrames/m-p/132736#M23195</link>
    <description>&lt;P&gt;Well found the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; posting answer in case if others face this issue in future.&lt;/P&gt;&lt;P&gt;following line was missing:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;import sqlContext.implicits._&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2016 20:29:52 GMT</pubDate>
    <dc:creator>smartninja723</dc:creator>
    <dc:date>2016-03-17T20:29:52Z</dc:date>
    <item>
      <title>Weird error while converting RDD[CaseClass] to DataFrames</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Weird-error-while-converting-RDD-CaseClass-to-DataFrames/m-p/132735#M23194</link>
      <description>&lt;P&gt;Hi guys,
I a csv which contains the contact details (name,email) like:&lt;/P&gt;&lt;PRE&gt;abc,abc@xyz.com
xyz,xyz@abc.com&lt;/PRE&gt;&lt;P&gt;I am building a case class and then trying to register the RDD[CaseClass] as data frame following the steps. But endup getting error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;error: value toDF is not a member of org.apache.spark.rdd.RDD[Contact]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;case class Contact(name:String,email:String)
val texts = sc.textFile("\pathto\contacts.csv") // doesn't contain headers.
val contacts = texts.map(s =&amp;gt;s.split(",")).map(s=&amp;gt;Contact(s(0),s(1)))
val contactsDF = contacts.toDF()
&lt;/PRE&gt;&lt;P&gt;Can anyone help me understand what's going wrong  here?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 20:06:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Weird-error-while-converting-RDD-CaseClass-to-DataFrames/m-p/132735#M23194</guid>
      <dc:creator>smartninja723</dc:creator>
      <dc:date>2016-03-17T20:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Weird error while converting RDD[CaseClass] to DataFrames</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Weird-error-while-converting-RDD-CaseClass-to-DataFrames/m-p/132736#M23195</link>
      <description>&lt;P&gt;Well found the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; posting answer in case if others face this issue in future.&lt;/P&gt;&lt;P&gt;following line was missing:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;import sqlContext.implicits._&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 20:29:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Weird-error-while-converting-RDD-CaseClass-to-DataFrames/m-p/132736#M23195</guid>
      <dc:creator>smartninja723</dc:creator>
      <dc:date>2016-03-17T20:29:52Z</dc:date>
    </item>
  </channel>
</rss>

