0
votes

Following is my problem.

I'm running list of cql commands with ./cqlsh localhost 9160 -f $TEXT_FILE

In the text file I have commands for copying column family1 to column family2 using the COPY command as below.

COPY sample (name,score,create_at) TO '/home/user1/cqlshtest/temp.csv';
COPY sample_new (name, score, create_at) FROM '/home/user1/cqlshtest/temp.csv';

I need to delete the entries that are copied to column family 2 from col.family1.Is there any way to do in cqlsh? or by any other workarounds ?

1

1 Answers

0
votes

Since COPY exports an entire table, you probably want to delete that original table, so you can use TRUNCATE http://cassandra.apache.org/doc/cql3/CQL.html#truncateStmt