By any chance are you using Spark 1.0.2? registerTempTable was introduced from Spark 1.1+ while for Spark 1.0.2, it would be registerAsTable.
On Sun Nov 23 2014 at 10:59:48 AM riginos <[email protected]> wrote: > Hi guys , > Im trying to do the Spark SQL Programming Guide but after the: > > case class Person(name: String, age: Int) > // Create an RDD of Person objects and register it as a table. > val people = > sc.textFile("examples/src/main/resources/people.txt"). > map(_.split(",")).map(p > => Person(p(0), p(1).trim.toInt)) > > im issuing: > people.registerTempTable("people") > <console>:20: error: value registerTempTable is not a member of > org.apache.spark.rdd.RDD[Person] > people.registerTempTable("people") > > why is that what I'm i doing wrong? > > > > -- > View this message in context: http://apache-spark-user-list. > 1001560.n3.nabble.com/Spark-SQL-Programming-Guide-registerTempTable-Error- > tp19591.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
