spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Wampler <deanwamp...@gmail.com>
Subject Re: registerTempTable is not a member of RDD on spark 1.2?
Date Mon, 23 Mar 2015 13:05:43 GMT
In 1.2 it's a member of SchemaRDD and it becomes available on RDD (through
the "type class" mechanism) when you add a SQLContext, like so.

val sqlContext = new SQLContext(sc)import sqlContext._


In 1.3, the method has moved to the new DataFrame type.

Dean Wampler, Ph.D.
Author: Programming Scala, 2nd Edition
<http://shop.oreilly.com/product/0636920033073.do> (O'Reilly)
Typesafe <http://typesafe.com>
@deanwampler <http://twitter.com/deanwampler>
http://polyglotprogramming.com

On Mon, Mar 23, 2015 at 5:25 AM, IT CTO <goi.cto@gmail.com> wrote:

> Hi,
>
> I am running spark when I use sc.version I get 1.2 but when I call
> registerTempTable("MyTable") I get error saying registedTempTable is not a
> member of RDD
>
> Why?
>
> --
> Eran | CTO
>

Mime
View raw message