spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheng, Hao" <>
Subject RE: InferredSchema Example in Spark-SQL
Date Mon, 18 May 2015 00:28:36 GMT
Forgot to import the implicit functions/classes?

import sqlContext.implicits._

From: Rajdeep Dua []
Sent: Monday, May 18, 2015 8:08 AM
Subject: InferredSchema Example in Spark-SQL

Hi All,
Was trying the Inferred Schema spart example

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()


View raw message