cqlsh
> copy bypramod(username, id, random, columns) to '/tmp/tp.csv' WITH DELIMITER ='\t';
Shell
grep ^PRIMARYKEY$'\t' tp.csv | awk -F'\t' '{print "delete from examplekeyspace.bypramod where username='\''" $1 "'\'' and id='\''" $2 "'\'' and random=" $3 ";"}' >secondfile.cql
> copy bypramod(username, id, random, columns) to '/tmp/tp.csv' WITH DELIMITER ='\t';
Shell
grep ^PRIMARYKEY$'\t' tp.csv | awk -F'\t' '{print "delete from examplekeyspace.bypramod where username='\''" $1 "'\'' and id='\''" $2 "'\'' and random=" $3 ";"}' >secondfile.cql
On new keyspace import the file.
cqlsh
source 'seconfile.cql'
source 'seconfile.cql'
***
No comments:
Post a Comment