SparkSQL error Table Not Found

前端 未结 5 1923
夕颜
夕颜 2020-12-10 13:51

I converted an RDD[myClass] to dataframe and then register it as an SQL table

my_rdd.toDF().registerTempTable(\"my_rdd\")
5条回答
  •  情歌与酒
    2020-12-10 14:28

    I have met the same error but in different case ,by solve it with using the same context. If you use hiveContext, make sure that you use it all the time, for example first sqlContext.sql("load data input XXX") , and then if you use hiveContext.sql("select * from XXX"), you will meet this problem.

    Every context has it`s lifecycle. So do not use two context with the same dataFrame .

提交回复
热议问题