Not able to run sql queries in sparl-sql

Hi Team,

Please find below issues i am facing while running spark-sql

1)Getting the error Access denied . PFA for the reference.
2)Spark context is getting stopped in between. PFA for the same. In between its throwing the error that spark context is getting stopped.
3) using notebook i tried running sql queries using magic sql (%%SQL) but its not working.

Hello @madasu_ashalatha

Before writing a select statement we have to create our own Database & Tables in our warehouse directory. If we have already done that we have to switch to our own database first - USE Your_dbname; & then use our table names of that particular database in the select statement.

Please go through the below link:

I hope it helps.