Like this?
case class Person(name: String, age: Int)
val people =
sc.textFile("examples/src/main/resources/people.txt").map(_.split(",")).map(p
=> Person(p(0), p(1).trim.toInt))
people.registerTempTable("people")
people.unpersist()
You can see this basic documentation
<http://spark.apache.org/docs/1.1.0/sql-programming-guide.html> for more
information.
Thanks
Best Regards
On Wed, Jan 28, 2015 at 2:55 PM, shahab <[email protected]> wrote:
> Hi,
>
> I just wonder if there is any way to unregister/re-register a TempTable in
> Spark?
>
> best,
> /Shahab
>