Experiment on the effect of different SaveMode and Cassandra starting from a populated table
If the cassandra table that spark targets exists then
SaveMode.Appendwill update itSaveMode.Overwritewill truncate and insert (but it requires option"confirm.truncate" -> "true")SaveMode.Ignorewill 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