0

I am trying to store data in Cassandra but I am confused on what to choose as my partition key and clustering key. I want to eventually be able to do lookups on the guest token. I am new to Cassandra and am researching and still trying to fully understand the partition and clustering keys. Any help would be appreciated. See data below:

 "guestToken": "a5vd72860v1575a3g9s1c92314f91r48",
 "event": "visit",
 "data_pipeline": "Spooline",
 "performers": "Busta Rhymes"
 "timestamp": "2020-03-20T09:40:25.328972V",
 "timeuuid": "bc578m1-c468-08ea-88af-0242ac120003"
 "glinkId": "gfcgu44a3-62qf-b0ns-612e563fe88"

1 Answer 1

1

It depends on your queries against this table and the amount of data being stored.

If you want to be able to query by "guestToken" only, you could go with "guestToken" as partition key. In this case the guestToken must be unique, otherwise you will overwrite entries with which have the same partition key.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.