I am trying to get the database from hive context but i am only getting default database while i have many databases present in hive.I am attaching the screenshot .Kindly guide me in this.Thanks
@anirvan_sen can you just type ‘sqlContext’ and post the result. Just want to see whether sqlContext object is of type HiveContext!
It is in hivecontext.But still not showing the tables
I guess you need to configure hive -site.xml file in spark/conf folder.
just follow these steps
check spark/conf folder and hive/conf folder
if you do not find hive-site.xml file in spark/conf folder which is present in hive/conf then create a soft link
sudo ln -s /usr/lib/hive/conf/hive-site.xml /usr/lib/spark/conf/hive-site.xml
Worked like a charm.I totally forgot about the soft link.Thanks a lot