Cassandra is upsert, you should be able to do what you need with a single 
statement unless you’re looking to maintain counters. 

I’m not sure if there is a Cassandra connector library written for spark 
streaming because we wrote one ourselves when we wanted to do the same.

Regards
Prathmesh Ranaut
https://linkedin.com/in/prathmeshranaut

> On Aug 29, 2019, at 7:21 AM, Shyam P <shyamabigd...@gmail.com> wrote:
> 
> Hi,
> I need to do a PoC for a business use-case.
> 
> Use case : Need to update a record in Cassandra table if exists.
> 
> Will spark streaming support compare each record and update existing 
> Cassandra record ?
> 
> For each record received from kakfa topic , If I want to check and compare 
> each record whether its already there in Cassandra or not , if yes , update 
> the record else insert a new record.
> 
> How can be this done using spark-structured streaming and cassandra? any 
> snippet or sample if you have.
> 
> Thank you,
> 
> Shyam

Reply via email to