Spark SQL is used for running SQL queries. We can use Spark SQL to interact with SQL as well as Dataset API in Spark.
During execution, Spark SQL uses same computation engine for SQL as well as Dataset API.
With Spark SQL we can get more information about the structure of data as well as computation being
performed.
We can also use Spark SQL to read data from an existing Hive installation.