Divakar
Divakar

Reputation: 21

cassandra copy data from one columnfamily to another columnfamily from two different keyspaces

I am a newbie to cassandra. is there a way to copy data from one column family from a key space to another keyspace?

We have an application, that generates new keyspaces of same column families. We are thinking to merge all them into one keyspace per tenant.

any commands or util available to do this?

Thanks in advance.

Upvotes: 0

Views: 609

Answers (1)

Helping Hand..
Helping Hand..

Reputation: 2440

you can use copy command in cqlsh..

COPY keyspacename1.columnfamilyname1 (id, name, email) TO 'temp.csv';

COPY keyspacename2.columnfamilyname2 (id, name, email) FROM 'temp.csv';

Upvotes: 1

Related Questions