this is Spark 2

you create temp table from df using HiveContext

val HiveContext = new org.apache.spark.sql.hive.HiveContext(sc)
scala> s.registerTempTable("tmp")
scala> HiveContext.sql("select count(1) from tmp")
res18: org.apache.spark.sql.DataFrame = [count(1): bigint]
scala> HiveContext.sql("select count(1) from tmp").show
[Stage 5:>                                                        (0 + 1) /
100]

HTH

Dr Mich Talebzadeh



LinkedIn * 
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com


*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.



On 11 August 2016 at 17:27, Richard M <richard.moorh...@gmail.com> wrote:

> How are you calling registerTempTable from hiveContext? It appears to be a
> private method.
>
>
>
> --
> View this message in context: http://apache-spark-user-list.
> 1001560.n3.nabble.com/Table-registered-using-registerTempTable-not-found-
> in-HiveContext-tp26555p27514.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: user-unsubscr...@spark.apache.org
>
>

Reply via email to