Hi Dev's,
Below is my code
BatchStatement batch = BatchStatement.newInstance(BatchType.UNLOGGED).addAll(list);
session.execute(batch);
where list is an ArrayList of PreparedStatements containing Insert queries
As insert is an upsert operation, so it updates an already existing record, but for a new record, it does not perform an insert nor does nit throw any exception/error
There are 2 tables in cassandra
1)Customer
Primary Key = (customerId, brand)
2)Campaign
Primary Key = (customerId, brand, name, version)
These tables contains UDT columns as well.
The Batch Execution will contain 1 customer insert/update and multiple campaign insert/update statements
The main intention is to achieve atomicity which ensures that if any one statement fails then it will fail the entire batch