I'm very new with Spark and Scala, and I'm using spark-shell accesing to Cassandra through datastax open source connector
with this command:
sc.cassandraTable("keyspace","table")
.select("gender","name")
.mapValues(v => v.get())
.lookup("Male")
and get this error:
error: value mapValues is not a member of com.datastax.spark.connector.rdd.CassandraTableScanRDD[com.datastax.spark.connector.CassandraRow]
I don't know if this transformation is only for datastax enterprise; and I am not able to find more information about that.
More details:
- Java 1.8.0_151
- Spark 2.2.1
- Scala 2.11
- Cassandra 3.11.1
mapValues
is applicable toRDD[Tuple2[_, _]]
, not anyRDD
. – Alper t. TurkerRDD
, butRDD
of what. By exampleRDD[Int]
- nomapValues
,RDD[(String, Int)]
-mapValues
which takesInt => U
– Alper t. Turker