Questions tagged [cql]

CQL (Cassandra Query Language) is used to interact with and query Cassandra tables. Its syntax is similar to SQL, helping to lower the learning curve to working with Cassandra. For the Cypher graph query language, use the cypher tag.

CQL (Cassandra Query Language) is used to interact with and query Cassandra tables. Its syntax is similar to SQL, helping to lower the learning curve to working with Cassandra. Despite their similarities, in many cases CQL behaves very differently from SQL, so it is important to read the documentation before going too far.

Some of the more useful links to documentation on CQL:

2118 questions
1
vote
1 answer

Composite keys and counter. I can create the column family but cant fill it

I understood a counter family could have keys of any kind. Are composite keys unsupported? cqlsh:goh_master> create columnfamily balance (kind ascii, corporation_id ascii, amount counter, primary key ( kind,corporation_id) ) with compact storage; …
Alar
  • 760
  • 4
  • 11
1
vote
1 answer

NDepend CQL queries returning N/A for LOC

Using the the following CQL query: SELECT NAMESPACES WHERE NameLike "Test$" ORDER BY NbLinesOfCode DESC I am getting some results that show "N/A" instead of a number for NbLinesOfCode. Anyone know why this is happening and how to resolve…
Dan Ling
  • 2,965
  • 2
  • 29
  • 43
0
votes
1 answer

Java lib between ajax and database

Background: I'm using geoserver and openlayers to develop a gis webapp. Now I find myself in the need to retrieve some data from the database to make statistics and other stuff (some not gis related). I'm currently using an old lib from my company…
Jose Antonio
  • 444
  • 5
  • 15
0
votes
1 answer

How can i list Cassandra cql result? Do i have to parse JSON?

How can i parse my json style result from Cassandra? I'm using the cassandra-cql gem for rails and i want to parse the query result to list all messages. My query looks like: def self.get_messages uid @@db.execute("SELECT * FROM messages WHERE…
user934801
  • 1,119
  • 1
  • 12
  • 30
0
votes
1 answer

Cassandra cql kind of multiget

i want to make a query for two column families at once... I'm using the cassandra-cql gem for rails and my column families are: users following followers user_count message_count messages Now i want to get all messages from the people a user is…
user934801
  • 1,119
  • 1
  • 12
  • 30
0
votes
1 answer

Cassandra cql comparator type counter

i want to use the following code for updating a field... @@db.execute("UPDATE user_count SET counters = counters + #{val} WHERE cid = 1 ") First time i tried that i got the following fail: CassandraCQL::Error::InvalidRequestException: invalid…
user934801
  • 1,119
  • 1
  • 12
  • 30
0
votes
0 answers

What is the benefit of using CqlTemplate vs CassandraTemplate?

I would like to know what the benefits are using CqlTemplate vs CassandraTemplate? I am aware that CassandraTemplate allows for object mapping. But is there anything more? How do they handle batching? Is one more performant than the other? Thank you
778899
  • 9
  • 1
  • 2
0
votes
0 answers

Cassandra partition with modulo-based timestamp

I will be capturing an event stream as records in a Cassandra table. I might expect perhaps 1000 events every second, resulting in a 1000 rows per second. In terms of partitioning, my presumption is to create a timestamp "bucket" for, perhaps,…
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
0
votes
2 answers

IN restrictions are not supported on indexed columns

I have an application where I have multiple selection dropdowns. According to that dropdown I need to get all values from the table. CREATE TABLE generic_keyspace.cust_table ( account_executive text, certification text, customer_category…
0
votes
0 answers

Scylladb/Apache cassandra data modelling

I want to model the following logic with Apache Cassandra/ScyllaDb, but I fail to figure out how to properly model the tables. The query that I want to apply has the following general idea : For a specific user, I want to retrieve items ordered by a…
0
votes
1 answer

How to get a semicolon as data inserted in Cassandra using cql-exec

As part of my local setup, using Intellij, I execute a setup.cql file as part of the build. However, I need to have a semicolon in one of the fields, as part of the data in that field. As expected, the semicolon ; is recognized and stops the…
Carnifex
  • 57
  • 1
  • 7
0
votes
2 answers

How do I use GROUP BY in Cassandra?

I have a dataset like ("group_1" , uuid , other, columns), ("group_1" , uuid , other, columns), ("group_1" , uuid , other, columns), ("group_2" , uuid , other, columns), ("group_2" , uuid , other, columns), ("group_3" , uuid , other,…
Hasani
  • 3,543
  • 14
  • 65
  • 125
0
votes
0 answers

The problem that cassandra4.x delete read repair brings

Cassandra4.x canceled the read repair strategy, so I can only repair it manually through nodetool? Also, let's say my reads are buggy, but don't even if manually fixed via nodetool, will the bugs keep growing without background read fixes? My…
Toki
  • 1
0
votes
0 answers

Select blob keys by prefix in Cassandra

I am using a Cassandra-compatible database (that is ScyllaDB) I use it purely as a Key-Value Store with keys and values being Blob, that is Vec type. That is, it is created by CREATE KEYSPACE kv WITH REPLICATION = { 'class' : 'SimpleStrategy',…
0
votes
2 answers

How do I perform multiple range queries within the same partition?

We would like to retrieve several columns in different ranges for the same partition. Currently our query looks like (key is the partition key. column1 is a clustering column). SELECT column1, value FROM tablename WHERE key = ?key AND column1 >=…
Oleksandr
  • 3,574
  • 8
  • 41
  • 78