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

How do I properly grant permissions to a specific keyspace to a user and validate it?

In short, the statement GRANT SELECt ON KEYSPACE AAA TO user; not take effect when executing LIST ALL PERMISSIONS OF user;. I find nothing when I google this.
0
votes
1 answer

CQL ALTER TABLE not working (add column + with properties)

I'm trying to run the following CQL command ALTER TABLE keyspace_name_abc.table_name ADD (field1 text, field2 text) WITH default_time_to_live = 15552000; But it is not working, the error I'm getting is: SyntaxException: line 1:NN mismatched input…
JaimeRG
  • 211
  • 2
  • 3
  • 7
0
votes
0 answers

UPDATE cql is not working, table is not updating

My CQL: UPDATE BBS_ID.users SET access_token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2RlIjoiNzIxMjk2IiwibmJmIjoxNjY4MTA0NTM5LCJleHAiOjE2NjgxMDgxMzgsImlhdCI6MTY2ODEwNDUzOX0.-1CSN-I2ppFmO9Q6O2y1b2rl_0z0gdvpPeGxEnadinI' WHERE email = 'luuqe' users…
Cream
  • 33
  • 5
0
votes
0 answers

Rest API and CQL request with email address or hostname?

I have a rest api to search in a confluence but I failed to write the request when I want to search for an email address or a hostname. When I use the following command line (just renamed some stuff to hide the real uri and my personnal data), I got…
alexbuisson
  • 7,699
  • 3
  • 31
  • 44
0
votes
1 answer

How do I execute a CQL statement inside a user-defined function?

I want to trigger the Cassandra query when the Java/JavaScript code if statement satisfied? For example: CREATE OR REPLACE FUNCTION f1 (val1 int, val2int) CALLED ON NULL INPUT RETURN int LANGUAGE java AS $$ int res = 0; …
0
votes
1 answer

Can I set a column to the value of another column in CQL?

I'm new to cassandra and I'm trying to create a new column witch content is based on another column. More precisely what I want to achive is, starting with following table: ColumnA ColumnB 1 text I want to update the table obtaining…
0
votes
0 answers

Apply cql to cassandra on bare metal during application deployment to kubernetes cluster

Our customer has a running cassandra cluster (not in a container). We are currently trying to find a way to apply cql scripts in an automated way during rollout of our application that is deployed in a kubernetes cluster. Our application is a…
0
votes
0 answers

CAP framework CQL UPDATE with timestamp comparison or case-when statement

I am trying to UPDATE an entity set with a where condition containing the comparison of two timestamps. However, this is not working, as somehow the timestamps can't be compared (I don't get any hits no matter which manipulation I apply on the…
sonja
  • 924
  • 1
  • 21
  • 52
0
votes
1 answer

How do I group by date in Cassandra?

I'm trying to find a query in Cassandra cql to group by date. I have "date" datatype where the date is like: "mm-dd-yyyy". I'm just trying to extract the year and then group by. How to achieve that? SELECT sum(amount) FROM data WHERE date = 'yyyy'
ssdn
  • 13
  • 3
0
votes
1 answer

How can I access two Cassandra rows as inputs to a UDF?

Like the title, In CASSANDRA, I'm trying to access 2 different row values belonging to different columns at the same time to perform an operation (like addition). Elaboration: Let's say I have 3 columns and some N rows -> row_id | start |…
0
votes
1 answer

Row uniqueness in Cassandra table with PRIMARY KEY (hash, created)

I'm trying to create a table containing 2 columns, one of which is a unique hash and another is the timestamp of when the row was created. CREATE TABLE IF NOT EXISTS keyspace.table ( account varchar, hash varchar, lt bigint, created…
Shayan Shojaei
  • 128
  • 1
  • 10
0
votes
1 answer

Can JDBC be used with Cassandra?

I have generic functions in my project that handle each database type, whether it's MySql or Oracle and more by using Statement and JDBC Connection. However when I try using them for supporting Cassandra, it doesn't work so I created a new function…
0
votes
1 answer

Is there a big performance difference with Cassandra LWTs?

I have a similar question, but it's not clear, so I'm asking myself. Simple. I want to update only when there is a target row, and if it doesn't, it shouldn't be done. (No new rows should be added.) After Select, check the value and Update Direct…
바보린
  • 159
  • 1
  • 13
0
votes
1 answer

How to modify or replace in PHP my SQL query containing "LIKE" and "bindValue" by CQL (Cassandra DataStax PHP DRIVER)?

Looking for how to do a LIKE in a CQL query (using the following Cassandra PHP Driver: https://github.com/datastax/php-driver) replacing my following SQL code: $con->execute("CREATE TABLE IF NOT EXISTS images(siteUrl varchar PRIMARY KEY,…
user7962781
0
votes
0 answers

How don't select the same row twice in two select cassandra queries?

I am working on a social networking project with cassandra. Users can subscribe to a profile and have access to the list of people who have subscribed to that same profile. My goal is to retrieve in a table called user_follows the list of people…
Jesver
  • 83
  • 1
  • 6
1 2 3
99
100