flambo

ccann 2016-05-16T19:43:24.000041Z

(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)))