Say you have the colums "foo", "foo.bar", "foo.baz", "monkeys"
And you want to read all the columns that start with 'foo.'
You could set the start column for the SliceRange to "foo." and the end column to "" and make repeated get_slice calls until you see a column that does not start with "foo."
Or you could set the start col to "foo." and the end col to "foo.~", again make repeated calls but cassandra should not return the money column.
(am saying to make repeated calls in case there are lots and lots of columns that start with foo)
The ~ character is the highest ascii character code (126) that is printable. If you are sorting by ASCII it's a handy marker, .
e.g. in python
In : s1 = "foo"
In : s2 = "foo.bar"
In : s3 = "monkeys"
In : q = "foo~"
In : s1<q
In : s2<q
In : s3<q
On 27 Jul, 2010,at 02:13 AM, Miriam Allalouf <email@example.com> wrote:
> You can query for things that start with a sub string but specifying a start
> value and an empty end value or an end value that is the start value
> concatenated with the max ascii character. Then just make multiple calls,
> say getting 1000 cols/rows at a time.
What do you mean by concatenated with the max ascii character when
looking for things that end with something?
Can you please bring an example?
> Hope that helps
> On 26 Jul, 2010,at 01:05 AM, Miriam Allalouf <firstname.lastname@example.org>
> I need to build a mode where I can retrieve an ordered list of objects
> sharing the same prefix and contains a certain delimiter.
> For example: Get all the object names that start with 'root' and
> contain '/' in it,
> given the names:
> should return the first two names (root@abc/ddd roo@bbb/c)
> I can build the model such that the a lot object name is a key or a column
> Can we retrieve a key or a column name using such filter or other
> regular expression-like filters?
> Thanks and I will appreciate you help,