Hi, I have created dataframe with below code and I was able to print the schema but unfortuntely cannot pull the data from the temporary table. It always says that table is not found
val df=convertRDDToDF(records, mapper, errorRecords, sparkContext); import sqlContext._ df.printSchema() df.registerTempTable("person") val personRecords = sqlContext.sql("select * from person") personRecords.foreach { println } Schema Output: root |-- address: struct (nullable = true) | |-- city: string (nullable = true) | |-- line1: string (nullable = true) | |-- state: string (nullable = true) | |-- zip: string (nullable = true) |-- first: string (nullable = true) |-- last: string (nullable = true) *Error while accessing table:* Exception in thread "main" org.apache.spark.sql.AnalysisException: Table not found: person; Does anyone have solution for this? Thanks, Asmath