0
當我嘗試使用此代碼無法從星火數據插入到卡桑德拉
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]
可這有什麼呢?
我也嘗試getString(),但它給我同樣的錯誤 –