当我尝试使用此代码插入记录时
val myRdd = sc.cassandraTable("mykeypace", "mytable")
val myTransformedRdd = myRdd.map {
( myRdd.getString("field1"), myRdd.GetString("field3") )
}
myTransformedRdd.saveToCassandra("mykeyspace", "someothertable",
SomeColumns("field1", field3"))
我遇到以下错误:
value GetString is not a member of com.datastax.spark.connector.rdd.CassandraTableScanRDD[com.datastax.spark.connector.CassandraRow]
这可能是什么?
答案 0 :(得分:0)
你有一个错字。而不是 GetString(),它必须是 getString()