Unable to access Database while executing Spark Scala JAR

Hi, while I am trying to execute a spark-jar application. I am getting an error that the database “SXP3702” doesn’t exist even though the database exists in Hive.

Screenshot of error while executing the jar file:

Code block:

@sandeepgiri can you check what I could be doing wrong here?

I think you have not enabled hive support while creating the spark context.

1 Like

Sure, let me try that.

Hi, now I am able to access the database my hive database but I am getting an error as I am trying to save the data frame as a table. Below are the screenshots of the error message while executing the jar and the code.

Thank you

Satyajeet Pradhan

Error:

Code block:

@abhinav, @sandeepgiri any pointers to my question above would be helpful.