JayaniH
JayaniH

Reputation: 363

Cassandra | Inserting data into two column families with the same row key

If I have 2 column families one for customer info and another for customer address info, how can I insert customer info and their address info to the two separate column families with the same row key(customer id) ?

Upvotes: 0

Views: 121

Answers (1)

GAK
GAK

Reputation: 1078

Use the batch insert.

BEGIN BATCH
  DML for insert into customer info ;
  DML for insert into customer address info, ;
APPLY BATCH ;

Why do you need two tables with the same primary? Can't you club them into one?

Upvotes: 1

Related Questions