looking for examples/samples using Spark aggregate and group by in Cassandra

79 Views Asked by At

I want to run the following query using Spark Python (pull data from Cassandra) similar to Oracle SQL:

select name, value, count(*) from table_name order by name, value 
group by name....

any examples/samples will help, thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Using Scala

val results = sqlContext.sql(
    "select name, value, count(*) from table group by name, value"
)