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

How much control over static and dynamic column mixing do I have in Cassandra CQL 3 table definitions?

I am trying to better understand what level I can actually mix static and dynamic columns in CQL3. I creating a table in CQL 3 to store user subscription data, but I am also testing out methods to store a tenant_id (with a secondary index) in the…
Paul Cichonski
  • 388
  • 1
  • 6
0
votes
1 answer

Astyanax map data access cql3

I'm trying to access a map column type using Astyanax. From the examples I've taken the following. I'm looping the rows and can get the data from all the columns except the column storename which has datatype MAP. I assume I need to loop over the…
user874639
  • 153
  • 1
  • 8
0
votes
1 answer

Cassandra CQL clone keyspace schema

I'm trying to dump the schema of a Cassandra keyspace that can be used to import it into another keyspace, for example to backup a cassandra keyspace and restore it into a different keyspace with the same schema. I'm using cqlsh: [cqlsh 2.3.0 |…
Dougnukem
  • 14,709
  • 24
  • 89
  • 130
0
votes
1 answer

Astyanax ALTER KEYSPACE CQL

I'm not managing to execute a cql statement that should update the replication factor of a SimpleStrategy keyspace. It's annoying because this works fine with all three versions of CQLSH. The keyspace context i'm using is set to use…
user2059239
  • 41
  • 1
  • 7
0
votes
1 answer

CQL3 order by statement is ordering uppercase strings first

Im finding that my CQL3 order by statements are returning strange results, where any strings starting with uppercase letters are ordered first, and then the lowercase strings are ordered second. Heres an example table: CREATE TABLE tester (rowkey…
beterthanlife
  • 1,668
  • 2
  • 18
  • 30
0
votes
1 answer

Model and ordered list in Cassandra

I need to model a list of items which is sorted by the time of last update of the item. Consider for instance a user task list. Each user has a list of tasks and each tasks has a due date. Tasks can be added to that list, but also the due date of a…
balafi
  • 2,143
  • 3
  • 17
  • 20
0
votes
1 answer

Set/Query columns form secondary compound key with CQL3

Say I have the following CF with compound Primary Key CREATE TABLE dpt ( empID int, deptID int, PRIMARY KEY (deptID, empID)); Because of the compound PK, cassandra will create one row for each dept, and the employee IDs that are…
balafi
  • 2,143
  • 3
  • 17
  • 20
0
votes
1 answer

Error when using cql3 with Astyanax

I was trying to run a simple Cql3 query with Astyanax and I keep on getting an error. The aim is to create a simple table via Astyanax using cql3. public class SomeTest { private AstyanaxContext astyanaxContext; private Keyspace…
Saurav Shah
  • 661
  • 3
  • 8
  • 16
0
votes
1 answer

rpc_timeout exception while inserting using cql2 or cql3

I have a column family which structure is CREATE TABLE practice ( id text, name text, addr text, pin text, PRIMARY KEY (id, name) ) WITH comment='' AND caching='KEYS_ONLY' AND read_repair_chance=0.100000 AND gc_grace_seconds=864000…
abhi
  • 4,762
  • 4
  • 29
  • 49
-1
votes
1 answer

Is it faster to do two lookups on primary keys or one lookup on a non-primary key?

I'm creating a table in cassandra for users. Users have both a unique user_id and a unique display_name. My table currently resembles: create table user (user_id text primary key, display_name text, joined timestamp, last_seen…
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
-1
votes
1 answer

Cassandra delayed / denied updates

I'm having trouble with a small Cassandra cluster that used to work well. I used to have 3 nodes. When I added the 4th, I started seeing some issues with values not updating, so I did nodetool repair (a few times now) on the entire cluster. I should…
user3395838
  • 1
  • 1
  • 1
-5
votes
1 answer

Cassandra SELECT BETWEEN two dates

How can i convert below SQL query to CQL query? SELECT * FROM csv_report WHERE sensor_id=170268 AND create_day BETWEEN 20150401 AND 20150403; also i trying different BETWEEN query: SELECT * FROM csv_report WHERE sensor_id=170268 AND create_day >=…
M.javid
  • 6,387
  • 3
  • 41
  • 56
1 2 3
43
44