Questions tagged [cql3]

Cassandra Query Language (CQL) is a SQL (Structured Query Language)-like language for querying Cassandra.

Cassandra Query Language (CQL) is a SQL (Structured Query Language)-like language for querying Cassandra.

Although CQL has many similarities to SQL, there are some fundamental differences.

For example, the CQL adaptation to the Cassandra data model and architecture, doesn't support operations, such as JOINs, which make no sense in a non-relational database.

657 questions
0
votes
1 answer

Cassandra nesting key-value. Better Solution?

I am trying to create a nested data model in a cassandra database similar to: Forums = { forum001: { name: "General News", topics: { topic000001: { subject: "This is what I think", …
user2356226
  • 37
  • 1
  • 5
0
votes
2 answers

Cannot query some of the cassandra datastore using cql3 in BAM

I am trying the real time traffic sample in BAM, and find the message is stored into cassandra keyspace, with column family: bam_message_store. However, with cql3, I can't browse the data, can you figure out why? cqlsh:bam_util_ks> select * from…
wiwengweng
  • 352
  • 1
  • 4
  • 16
0
votes
1 answer

Why "SELECT DISTINCT" is not working in CQL3?

Why "SELECT DISTINCT" is not working in CQL3? What am I doing wrong here? Please help me to resolve this issue. As per CQL3 documentation DISTINCT should work with partition keys. [root@ip-10-12-75-197 /]# cqlsh Connected to Test Cluster at…
0
votes
1 answer

CQL3 Collections with Compact Storage?

This question is about this article of Datastax. In its "Non compact tables" sub-topic, it says The difference is that the definition above will internally use a CompositeType comparator with a single UTF8Type component, instead of an UTF8Type…
Bee
  • 12,251
  • 11
  • 46
  • 73
0
votes
1 answer

Choosing python client lib for Cassandra

I have worked with Pycassa before and wrote a wrapper to use batch mutation & connection pooling etc. But http://wiki.apache.org/cassandra/ClientOptions recommends now to use CQL 3 based api because Thrift based api (Pycassa) will be supported for…
NullException
  • 4,232
  • 8
  • 24
  • 44
0
votes
1 answer

Cassandra cql version using binary protocol

In my command line showConnected to Test Cluster at localhost:9160. version but cql3 binary protocol host is different what should i do instead of using thrift to binary protocol in cassandra.
Hari Haran
  • 1,543
  • 4
  • 13
  • 25
0
votes
1 answer

Choosing the right schema for cassandra "table" in CQL3

We are trying to store lots of attributes for a particular profile_id inside a table (using CQL3) and cannot wrap our heads around which approach is the best: a. create table mytable (profile_id, a1 int, a2 int, a3 int, a4 int ... a3000 int) primary…
Pavel
  • 964
  • 1
  • 6
  • 18
0
votes
1 answer

Hadoop Multiple Outputs with CQL3

I need to output the results of a MR job to multiple CQL3 column families. In my reducer, I specify the CF using MultipleOutputs, but all the results are written to the one CF defined in the job's OutputCQL statement. Job…
beterthanlife
  • 1,668
  • 2
  • 18
  • 30
0
votes
2 answers

Cassandra CQL update columns

I have a Cassandra table: CREATE TABLE test ( c1 text primary key, c2 text ); Column c2 has values like 'a', 'b', 'c', ... Now I want to change the value of c2 to 'a' for all rows. (Let's say I have ten thousand rows) What's the best way to…
user2122264
  • 163
  • 1
  • 2
  • 7
0
votes
1 answer

Cassandra Schema To Cache Application Data

I have a program that does some fairly intensive calculations, and I would like to cache the results of those calculations in a Cassandra table. What is the best schema to use to do so? Currently, I'm using the following schema: CREATE TABLE…
srlm
  • 3,186
  • 2
  • 27
  • 40
0
votes
1 answer

cassandra: get columns of a wide row in reverse order with some filtering

I understand that cassandra does not support order by with secondary indexes but I really do not want order by feature. All I want is an ability to get columns in ascending or descending order as stored in column family since cassandra already sorts…
user2903819
  • 180
  • 2
  • 12
0
votes
2 answers

Unpack Cassandra Map Type

I have created some data using Cassandra DB 2.0.1 (CQL 3) CREATE TABLE fans (id text PRIMARY KEY, fans map); INSERT INTO fans (id, fans) VALUES ('John', {'fruit' : 'apple', 'band' : 'Beatles'}); UPDATE fans SET fans = fans + {'movie' :…
0
votes
1 answer

PRIMARY KEY part colname cannot be restricted by IN relation

My CQL3 table is like this CREATE TABLE stringindice ( id text, colname text, colvalue blob, PRIMARY KEY (id, colname, colvalue) ) WITH COMPACT STORAGE and I have inserted some values in it. Now when I am trying to do something like…
Easility
  • 716
  • 2
  • 8
  • 19
0
votes
1 answer

Storing person group membership under cassandra

Assuming all people records are identified by a UUID and all groups are identified by a UUID. What data model would you create when you need to commonly query the list of all people in a group, and the list of all groups a person belongs to.…
Jay
  • 19,649
  • 38
  • 121
  • 184
0
votes
1 answer

create Composite-keyed Table with cassandra-cli

i want to use php for my project with phpcassa which doesn't support cql, so if I understood right I have to code cassandra commands like I would with cassandra-cli. My question is how can I create a Composite-keyed Table or Dynamic Column…
user1072680