Using Spark Cassandra Connector, I have a case where i want to use UPDATE IF EXISTS and if does not exist in table then ignore.
In the Cassandra documentation we have this condition in Cassandra 2.0.7 and later, you can conditionally update columns using IF or IF EXISTS.
Add IF EXISTS to the command to ensure that the operation is not performed if the specified row does not exist:
UPDATE cycling.cyclist_id SET age = 28 WHERE lastname = 'WELTEN' and firstname = 'Bram' IF EXISTS;
However, it's unclear to me if this can be done in the Spark Cassandra Connector. Does anyone know how this can be done?
Looks like it is not something that can be done right now but it is an open issue.
https://datastax-oss.atlassian.net/browse/SPARKC-386 - Answered by Andrew Mills