2,143
questions
2
votes
3
answers
50
views
Is it possible to identify the Cassandra engine/system via CQL?
I tried to identify the engine (Cassandra, Scylla, AstraDB, CosmosDB, Yugabyte, ...) based on Cassandra Query Language (CQL). I focused on tables system.local and system.peers, see the sample:
SELECT ...
2
votes
1
answer
50
views
How to convert the value returned from writetime() into datetime in Scylla CQL?
I would like to convert the integer timestamp returned by writetime() to a readable datetime format in Scylla cqlsh.
After some Googling I found the following answer that works for Cassandra:
...
1
vote
1
answer
104
views
system.local table restrictions - AstraDB Serverless (Cassandra)
I'm trying to execute "toUnixTimestamp(now())" against system.local table (AstraDB Serverless).
It works fine when I execute it inside AstraDB CQL Console: SELECT toUnixTimestamp(now()) FROM ...
0
votes
1
answer
34
views
How do I query for null datetime fields?
I need to query records with NULL datetime fields in a Cassandra database. Specifically, I want to select rows where the datetime field is NULL.
Here’s an example of my schema:
CREATE TABLE testing....
0
votes
2
answers
42
views
Why do parentheses in CQL WHERE clause return SyntaxException?
SELECT * FROM alarm_history
WHERE domain IN ('BAREMETAL','CLOUD','CORE','FIBER','INFRA','PLATFORM','RAN','SECURITY','TRANSPORT')
AND ((actual_severity = 'MAJOR') AND (technology = 'LTE'))
...
0
votes
0
answers
36
views
Append a json to a key which is a array in a existing json column
I have a JSON {"user": "test"} and I have an existing JSON column userjson which is {"uid": "1", "info": []} in my cassandra database.
I want to ...
0
votes
1
answer
46
views
Dynamic prepared statement query for CQL in Java
I have to create CQL queries for multiple tables Java. An example of one such query is:
Statement select = QueryBuilder.select().all().from("MyKeySpace","MyTable")
...
1
vote
1
answer
119
views
Gocql Allow Filtering returns empty records with page size
Im using gocql to interact with my scylla database and implementing pagination using page states. However while using ALLOW FILTERING it returns empty records if the filtered data is not within the ...
1
vote
1
answer
56
views
Running SAI example returns SyntaxException, "no viable alternative at input 'OR'"
An error occurred when performing the OR operation according to cassandra's sai example
version:[cqlsh 6.2.0 | Cassandra 5.0-beta1 | CQL spec 3.4.7 | Native protocol v5]
CREATE TABLE IF NOT EXISTS ...
0
votes
1
answer
33
views
Cassandra error with encoding during data import
i'm trying to import data from csv files according to notepad++ encoded in utf-8-bom to tables in cassandra4.0 and i'm getting error:
Starting copy of airportdb.airport with columns [airport_id, iata, ...
0
votes
1
answer
62
views
Delete records in Datastax vector database
how do i delete 7 records from my vector database "Moos" where content = "/start"
preferable in Datastax UI, or in CQL otherwise in javascript
something like : delete from Moos ...
2
votes
2
answers
413
views
Allow filter in cassandra query
I have one table
CREATE TABLE user (
p1 int,
p2 int,
created_at timestamp,
user_name text,
c1 text,
PRIMARY KEY ((p1, p2),user_name)
) WITH additional_write_policy = '99p';
...
0
votes
2
answers
65
views
How to properly design a Cassandra table for CQL order by timestamp ASC
I need to run the following type of query:
SELECT * FROM outbox
ORDER BY timestamp ASC
LIMIT 10
DDL:
CREATE TABLE IF NOT EXISTS stories_views.outbox (
key_id uuid,
message text,
...
1
vote
1
answer
75
views
CONTAINS statement that accepts multiple data in Cassandra
I have a question on Cassandra as a newbie.
I was wondering if it's possible somehow to make a query with a contains statement (i found out that an in statement might not be the best for lot's of data)...
0
votes
1
answer
62
views
Can cassandra create table over files stored in S3?
I know that Athena allows you to query data directly from files stored in Amazon S3 using SQL syntax. Athena doesn't have a storage system; instead, it creates a schema and metadata layer on top of ...