How can I request a cli request in Cassandra using a compound key?

In Cassandra, I create the following column family:

  CREATE COLUMN FAMILY test with comparator = 'CompositeType(UTF8Type,UTF8Type)' and key_validation_class=UTF8Type;

Now I want to add some data:

set test['a']['b:c'] = 'abc'
set test['a']['b:d'] = 'abd'
set test['a']['e:f'] = 'aef'
set test['a']['e:g'] = 'aeg';

Now, I would like to get all the lines that have e in its composite key:

sort of:

 get test['a']['e:*];

and the result should be "aef" and "aeg".

What should the cli request look like?

+5
source share
1 answer

I'm not sure about CQL, but with playOrm, if you are split into a, you can simply execute an S-SQL query (scalable SQL)

PARTITIONS alias('a') SELECT alias FROM Table as alias WHERE a.column = 'e';

A section can have millions of lines.

In any case, I just thought it might help you.

+2
source

All Articles