Experiment on the effect of different SaveMode
and Cassandra starting from a populated table
If the cassandra table that spark targets exists then
SaveMode.Append
will update itSaveMode.Overwrite
will truncate and insert (but it requires option"confirm.truncate" -> "true"
)SaveMode.Ignore
will not perform any action on existing tableSaveMode.ErrorIfExists
(default) will throw the following exception: https://github.com/datastax/spark-cassandra-connector/blob/v2.0.6/spark-cassandra-connector/src/main/scala/org/apache/spark/sql/cassandra/DefaultSource.scala#L93-L96