1

I need to delete all rows with given clustering column value. I don't have partition key so I don't have complete primary key. To delete record from Cassandra table we need to provide specific partition key. Therefore first I need to select records to delete using this clustering column value and then deleting that record with the help of associated partition key values.

1
  • use Spark to do it, for example...
    – Alex Ott
    Commented May 13, 2020 at 11:58

1 Answer 1

1

In CQL, you can't directly use the result of one query inside another, like you would in SQL. You need to execute separate queries, and your application needs to handle the logic. If the result of your first query is very large, try to use paging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.