(defn save-to-cassandra
[^SQLContext sqlc rdd schema]
(-> (.createDataFrame sqlc rdd schema)
(.write)
(.mode "append")
(.format "org.apache.spark.sql.cassandra")
(.options {"keyspace” "foo"
"table” "bar"})
(.save)))