Hi Chris,
I had something slightly different in mind. You would treat it as time
series data, and have one record for each of the days the route was valid.
In your case:
start | end| valid
New York Washington 2016-01-01
New York Washington 2016-01-02
New York
init.co.uk]
Sent: Thursday, March 24, 2016 9:40 AM
To: user@cassandra.apache.org
Subject: Re: DataModelling to query date range
Ah- that looks interesting! I'm actaully still on cassandra 2.x but I was
planning on updgrading anyway. Once I do so I'll check this one out.
Chris
On T
Ah- that looks interesting! I'm actaully still on cassandra 2.x but I was
planning on updgrading anyway. Once I do so I'll check this one out.
Chris
On Thu, Mar 24, 2016 at 2:57 AM, Henry M wrote:
> I haven't tried the new SASI indexer but it may help:
> https://github.com/apache/cassandra/
Hi Vidur,
I had a go at your solution but the problem is that it doesn't match routes
which are valid all throughtout the range queried. For example if I have
route that is valid for all of Jan 2016. I will have a table that looks
something like this:
start | end| vali
I haven't tried the new SASI indexer but it may help:
https://github.com/apache/cassandra/blob/trunk/doc/SASI.md
On Wed, Mar 23, 2016 at 2:08 PM, Chris Martin wrote:
> Hi all,
>
> I have a table that represents a train timetable and looks a bit like this:
>
> CREATE TABLE routes (
> start text,
Flip the problem over. Instead of storing validTo and validFrom, simply
store a valid field and partition by (start, end). This may sound wasteful,
but disk is cheap:
CREATE TABLE routes (
start text,
end text,
valid timestamp,
PRIMARY KEY ((start, end), valid)
);
Now, you can execute something l
Hi all,
I have a table that represents a train timetable and looks a bit like this:
CREATE TABLE routes (
start text,
end text,
validFrom timestamp,
validTo timestamp,
PRIMARY KEY (start, end, validFrom, validTo)
);
In this case validFrom is the date that the route becomes valid and validTo
is t