You mean toDF() not toRD(). It stands for data frame of that makes it easier to remember.

Simon

On 18 May 2015, at 01:07, Rajdeep Dua <rajdeep.dua@gmail.com> wrote:

Hi All,
Was trying the Inferred Schema spart example
http://spark.apache.org/docs/latest/sql-programming-guide.html#overview

I am getting the following compilation error on the function toRD()

value toRD is not a member of org.apache.spark.rdd.RDD[Person]
[error]     val people = sc.textFile("/home/ubuntu/work/spark-src/spark/examples/src/main/resources/people.txt").map(_.split(",")).map(p => Person(p(0), p(1).trim.toInt)).toRD()
[error]              

Thanks
Rajdeep