Spark-shell: which basically opens the scala> prompt. Where query needs to write in below manner
val sqlContext = new org.apache.spark.sql.hive.HiveContext(sc)
// Queries are expressed in HiveQL
sqlContext.sql("FROM src SELECT key, value").collect().foreach(println)
spark-sql: Which seems to connect directly to hive metastore and we can write query in similar way to hive. And query over existing data in hive
I want to know the difference between these two.. And will processing any query in spark-sql is same as in spark-shell? I mean can we leverage performance benefits of spark in spark-sql?
Spark 1.5.2's here.
sqlContextso you don't need this lineval sqlContext = new org.apache.spark.sql.hive.HiveContext(sc). - Glennie Helles Sindholt