outworkers/phantom

How to update or search Cassandra table with multiple fields that are not a Partition Key

sujit-baniya opened this issue · 5 comments

Hello,

I was trying to connect Phantom driver to scala. I'm able to insert data to the cassandra table. But when I tried to search or update table by name or some field other than ID(PartitionKey), I couldn't do that.

Please suggest one how can I achieve the solution?

@alexflav23 Thank you for quick response. I checked the file but the query is using pKey which I believe is PartitionKey.

@itsursujit That's how Cassandra works. Maybe spend some time reading about data modelling in Cassandra. https://medium.com/outworkers

@itsursujit This specifically might help you: https://medium.com/outworkers/at-outworkers-cassandra-and-datastax-enterprise-are-core-technologies-in-our-area-of-competence-4a1df2eb718d.

Otherwise read the docs on how to use SASI indexes, secondary indexes etc.

Great! Thank you