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
13
votes
2 answers

Apache Cassandra delete from counter

I'm developing a little web application for studying Apache Cassandra and Java EE 6. Cassandra version is 1.1.6. Have a problem driving me mad... I created a table with a counter (using cqlsh v. 3.0.0) CREATE TABLE test ( author varchar PRIMARY…
besil
  • 1,308
  • 1
  • 18
  • 29
12
votes
2 answers

Error: unable to connect to cassandra server. Unconfigured table

I am trying to connect to cassandra, which is running on local desktop, via cassandra-driver for python using this simple code. from cassandra.cluster import Cluster cluster = Cluster() session = cluster.connect() and getting this error:…
Olzhabay
  • 165
  • 1
  • 1
  • 7
12
votes
2 answers

Cassandra NOT EQUAL Operator

Question to all Cassandra experts out there. I have a column family with about a million records. I would like to query these records in such a way that I should be able to perform a Not-Equal-To kind of operation. I Googled on this and it seems I…
Babu James
  • 2,740
  • 4
  • 33
  • 50
12
votes
2 answers

Can I create a secondary index on multiple columns in cassandra

Can I create a secondary index on multiple columns in cassandra? like can I do create index my_composite_index on my_column_family (id,name) CQL throws error :2:Bad Request: line 1:73 mismatched input ',' expecting ')'
user1955409
  • 211
  • 1
  • 3
  • 6
12
votes
5 answers

Does collections in CQL3 have certain limits?

As there are two ways to support wide rows in CQL3..One is to use composite keys and another is to use collections like Map, List and Set. The composite keys method can have millions of columns (transposed to rows).. This is solving some of our use…
Easility
  • 716
  • 2
  • 8
  • 19
11
votes
1 answer

Cassandra Wide Row/Dynamic Columns

I'm new to NoSQL; so, I'm trying to understand some of the Cassandra concepts that I can't really get from the dozens of sources that I have studied. Should I consider wide row, and dynamic columns as synonyms; or are they 2 different concepts? Am…
user1888243
  • 2,591
  • 9
  • 32
  • 44
11
votes
1 answer

Alter cassandra column family primary key using cassandra-cli or CQL

I am using Cassandra 1.2.5. After creating a column family in Cassandra using cassandra-cli, is it possible to modify the primary key on the column family using either cassandra-cli or CQL? Specifically, I currently have the following table (from…
Justin Sweeney
  • 133
  • 1
  • 1
  • 7
10
votes
2 answers

Modeling many-to-many relations in Cassandra 2 with CQL3

What is the canonical way to model many-to-many relations with CQL3 ? Let's say I have to tables CREATE TABLE actor ( id text PRIMARY KEY, given text, surname text, ) CREATE TABLE fan ( id text PRIMARY KEY, given text, …
Marco Righele
  • 2,702
  • 3
  • 23
  • 23
10
votes
1 answer

Paging Resultsets in Cassandra with compound primary keys - Missing out on rows

So, my original problem was using the token() function to page through a large data set in Cassandra 1.2.9, as explained and answered here: Paging large resultsets in Cassandra with CQL3 with varchar keys The accepted answer got the select working…
Marius Waldal
  • 9,537
  • 4
  • 30
  • 44
10
votes
3 answers

Cassandra Non-Counter Family

I'm attempted to execute the following CQL 3 statement CREATE TABLE summary ( id uuid, "client" bigint, "campaign" text, "unit" bigint, "view" counter, …
Dharun
  • 613
  • 8
  • 26
10
votes
2 answers

Cassandra CQL query check multiple values

How can I check if a non-primary key field's value is either 'A' or 'B' with a Cassandra CQL query? (I'm using Cassandra 2.0.1) Here's the table definition: CREATE TABLE my_table ( my_field text, my_field2 text, PRIMARY KEY (my_field) ); I…
user2122264
  • 163
  • 1
  • 2
  • 7
10
votes
4 answers

Iterating through Cassandra wide row with CQL3

How can I pull in a range of Composite columns with CQL3? Consider the following: CREATE TABLE Stuff ( a int, b text, c text, d text, PRIMARY KEY (a,b,c) ); In Cassandra what this effectively does is creates a ColumnFamily with…
JnBrymn
  • 24,245
  • 28
  • 105
  • 147
10
votes
2 answers

Inserting arbitrary columns in Cassandra using CQL3

Prior to CQL3 one could insert arbitrary columns such as columns that are named by a date: cqlsh:test>CREATE TABLE seen_ships (day text PRIMARY KEY) WITH comparator=timestamp AND default_validation=text; cqlsh:test>INSERT INTO…
JnBrymn
  • 24,245
  • 28
  • 105
  • 147
10
votes
3 answers

If Dynamic columns are discouraged in cassandra 1.2/Cql3 , then how is it better than Mysql in functionality?

Initially I started learning Cassandra because dynamic columns caught my attention. As I started learning more, I learnt that composite primary keys are preferred to dynamic columns and Cassandra is moving to schema based (Schema is optional and not…
mac
  • 627
  • 1
  • 9
  • 21
9
votes
1 answer

Counter Vs Int column in Cassandra?

I'm new in Cassandra. I can't understand what is the advantage of using counter in a table (or even in a different table if the non-counter columns are not part of the composite PRIMARY KEY)? Why we don't use a column with Int type, when I will have…
Elnaz
  • 2,854
  • 3
  • 29
  • 41
1 2
3
43 44