AnsweredAssumed Answered

Renaming the table in Hive causing the Analysis exception

Question asked by jalendhar on Apr 24, 2018
Latest reply on May 14, 2018 by maprcommunity

After rename the Table in Hive getting the org.apache.spark.sql.AnalysisException: Path does not exist: maprfs:/user/hive/warehouse/adult.

 

Code snippet:

var df = spark.read.format("com.databricks.spark.csv").option("header", "true").load("/root/adult.csv")
df.write().mode("overwrite").saveAsTable("order");

spark.sql("drop table adult")
spark.sql("alter table adult-temp rename to adult")

spark.sql("select *from adult").show()

 

I am using the Mapr-Sandbox-For-Hadoop-6.0.0

 

 

Outcomes