incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laing, Michael" <michael.la...@nytimes.com>
Subject Re: How to select timestamp with CQL
Date Wed, 23 Oct 2013 11:33:41 GMT
http://www.datastax.com/documentation/cql/3.1/webhelp/index.html#cql/cql_reference/select_r.html


On Wed, Oct 23, 2013 at 6:50 AM, Alex N <lotqua@gmail.com> wrote:

> Thanks!
> I can't find it in the documentation...
>
>
>
> 2013/10/23 Cyril Scetbon <cyril.scetbon@free.fr>
>
>> Hi,
>>
>> Now you can ask for the TTL and the TIMESTAMP as shown in the following
>> example :
>>
>> cqlsh:k1> select * FROM t1 ;
>>
>>  *ise*    | *filtre* | *value_1*
>> --------+--------+---------
>>  *cyril1* |      *2* |   *49926*
>>  *cyril2* |      *1* |   *18584*
>>  *cyril3* |      *2* |   *31415*
>>
>> cqlsh:k1> select filtre,writetime(filtre),ttl(filtre) FROM t1 ;
>>
>>  *filtre* | *writetime(filtre)* | *ttl(filtre)*
>> --------+-------------------+-------------
>>       *2* |  *1380088288623000* |        *null*
>>       *1* |  *1380088288636000* |        *null*
>>       *2* |  *1380088289309000* |        *null*
>>
>>  Regards
>> --
>> Cyril SCETBON
>>
>> On 23 Oct 2013, at 12:00, Alex N <lotqua@gmail.com> wrote:
>>
>> Hi,
>> I was wondering how could I select column timestamp with CQL. I've been
>> using Hector so far, and it gives me this option. But I want to use
>> datastax CQL driver now.
>> I don't want to mess with this value! just read it. I know I should
>> probably have separate column with timestamp value created by my own, but I
>> don't want to change the schema and update milions of rows know.
>> I found this ticket https://issues.apache.org/jira/browse/CASSANDRA-4217and it's
fixed but I don't know how to use it -
>>
>> SELECT key, value, timestamp(value) FROM foo; - this doesn't work.
>> Regards,
>> Alex
>>
>>
>>
>>
>

Mime
View raw message