How to query hive tables using Spark SQL from the terminal

apache-spark

#1

How do I query the existing Hive tables on Spark SQL from the terminal directly.
Also there are multiple databases, so I need to work with different tables in different databases.

NOTE: I do not have access the file location, just the HIVE tables.


#2

Resolved:
Ran spark with hive Context and select * from dbname.tablename.


#3

If you want to do it programmatically , click on the below link :smile: