SparkSQL error Table Not Found SparkSQL error Table Not Found sql sql

SparkSQL error Table Not Found


Make sure to import the implicits._ from the same SQLContext. Temporary tables are kept in-memory in one specific SQLContext.

val sqlContext = new SQLContext(sc)import sqlContext.implicits._my_rdd.toDF().registerTempTable("my_rdd")val my_df = sqlContext.sql("SELECT * from my_rdd LIMIT 5")my_df.collect().foreach(println)


I found it easy to cause problems with temptables if there is more than one open zeppelin session, either in your own browser, or from someone else using the same server. The variable sqlContext is shared across those sessions and its easy to overwrite the value of it.


So as the solution of this problem I copied core-site.xml,hive-site.xml and hdfs-site.xml files into conf directoy.