简体   繁体   English

从 cassandra 中删除记录

[英]Delete records from cassandra

I have written wrong update command.我写错了更新命令。

update table_name set col_val = 'x' where PRI_KEY_1 IN ( 50 values ) and PRI_KEY_2 IN ( 50 values ) and CLUSTER_KEY IN ( 10 Values );

This has created 40000 records where there was only 150. I can see only columns mentioned in query- PRI_KEY_1 ,PRI_KEY_2 and CLUSTER_KEY are updated in those extra 39850.这创建了 40000 条记录,而只有 150 条记录。我只能看到查询中提到的列 - PRI_KEY_1 、PRI_KEY_2 和 CLUSTER_KEY 在那些额外的 39850 条中更新。

Now I need help in deleting all those 39850 records.现在我需要帮助删除所有这些 39850 条记录。 Please Help.请帮忙。

Unfortunately, there isn't a quick fix for it.不幸的是,没有快速解决方法。

You will need to iterate over those records and issue a DELETE .您将需要遍历这些记录并发出DELETE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM