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

617 views Asked by At

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.

1

There are 1 answers

4
Helping Hand.. On

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';