You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jason Hill <ja...@gmail.com> on 2012/08/08 05:16:24 UTC
Assume Keys in cqlsh?
Hello,
I'm using:
[cqlsh 2.0.0 | Cassandra 1.0.10 | CQL spec 2.0.0 | Thrift protocol 19.20.0]
I have a column family with a key that is a blob so I query it like this:
SELECT FIRST 10 1..1344385804 FROM <myCF> WHERE KEY =
'436170616369747943616c63756c61746f727c33';
Is there any way to avoid the hex I'm using for the key?
I tried the following
ASSUME <myCF> KEYS ARE text;
but it gave this error:
Improper assume command.
I'm thinking I've missed something here and hope a kind soul would
point me to a solution.
Cheers,
Jason
Re: Assume Keys in cqlsh?
Posted by paul cannon <pa...@datastax.com>.
"assume" isn't in CQL, that's right--however, it IS in cqlsh. You're just
using it wrong. Try:
ASSUME <myCF> KEY values are text;
Remember, in CQL, row keys are just another column, so you need to treat
"KEY" (if that's the name of your key column) as a normal column. "HELP
ASSUME" in cqlsh might help you out more (or it might not).
p
On Sat, Aug 11, 2012 at 2:59 PM, Tyler Hobbs <ty...@datastax.com> wrote:
> As far as I know, "assume" isn't a CQL feature, it's only part of
> cassandra-cli.
>
>
> On Tue, Aug 7, 2012 at 10:16 PM, Jason Hill <ja...@gmail.com>wrote:
>
>> Hello,
>>
>> I'm using:
>>
>> [cqlsh 2.0.0 | Cassandra 1.0.10 | CQL spec 2.0.0 | Thrift protocol
>> 19.20.0]
>>
>> I have a column family with a key that is a blob so I query it like this:
>>
>> SELECT FIRST 10 1..1344385804 FROM <myCF> WHERE KEY =
>> '436170616369747943616c63756c61746f727c33';
>>
>> Is there any way to avoid the hex I'm using for the key?
>>
>> I tried the following
>>
>> ASSUME <myCF> KEYS ARE text;
>>
>> but it gave this error:
>>
>> Improper assume command.
>>
>>
>> I'm thinking I've missed something here and hope a kind soul would
>> point me to a solution.
>>
>> Cheers,
>> Jason
>>
>
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>
>
Re: Assume Keys in cqlsh?
Posted by Tyler Hobbs <ty...@datastax.com>.
As far as I know, "assume" isn't a CQL feature, it's only part of
cassandra-cli.
On Tue, Aug 7, 2012 at 10:16 PM, Jason Hill <ja...@gmail.com> wrote:
> Hello,
>
> I'm using:
>
> [cqlsh 2.0.0 | Cassandra 1.0.10 | CQL spec 2.0.0 | Thrift protocol 19.20.0]
>
> I have a column family with a key that is a blob so I query it like this:
>
> SELECT FIRST 10 1..1344385804 FROM <myCF> WHERE KEY =
> '436170616369747943616c63756c61746f727c33';
>
> Is there any way to avoid the hex I'm using for the key?
>
> I tried the following
>
> ASSUME <myCF> KEYS ARE text;
>
> but it gave this error:
>
> Improper assume command.
>
>
> I'm thinking I've missed something here and hope a kind soul would
> point me to a solution.
>
> Cheers,
> Jason
>
--
Tyler Hobbs
DataStax <http://datastax.com/>