Querying Cassandra data using Spark SQL in Scala
You can execute Spark SQL queries in Scala by starting the Spark shell. When you start Spark, DataStax Enterprise sets the context to allow you to run Spark SQL queries against Cassandra tables.
When you start Spark, DataStax Enterprise sets the context to allow you to run Spark SQL queries against Cassandra tables. Use the setKeyspace method to connect to a Cassandra keyspace, and then use the sql method to execute the query.