cql Questions
11
Solved
I have been reading articles around the net to understand the differences between the following key types. But it just seems hard for me to grasp. Examples will definitely help make understanding b...
3
Solved
In SQL, I am able to do:
select getdate(), getdate() - 7
Which returns the current date as well as current date - 7 days. I want to achieve the same in Cassandra CQL. I tried:
select dateof(now...
4
Solved
Just installed (copied over the app from the downloaded dmg) DevCenter 1.6 on my mac, running macOs Sierra 10.12.6 with jdk 8u152 installed. The application loads a UI (splash screen then a couple ...
7
Solved
Maybe it is a stupid question, but I'm not able to determine the size of a table in Cassandra.
This is what I tried:
select count(*) from articles;
It works fine if the table is small but once i...
3
Solved
I'm trying to replicate a SQL database in Cassandra, but, while I had no problem creating the tables, I found that I cannot find an example easy to understand that shows how I can create foreign ke...
Aldana asked 28/12, 2014 at 13:46
4
Solved
For Cassandra, do UPDATEs become an implied INSERT if the selected row does not exist? That is, if I say
UPDATE users SET name = "Raedwald" WHERE id = 545127
and id is the PRIMARY KEY of the us...
4
Solved
I used USE billKeyspace; to enter a keyspace and start using it. Now I want to exit this keyspace and enter another keyspace. How to do that?
If I use exit; or quit; it exits out of cql session it...
Torsk asked 4/1, 2017 at 16:31
1
Solved
I have been tasked to come up with a schema to store our application logs using Cassandra. I am quite new to Cassandra but from what I have read and learned so far, it could be the best approach fo...
Norikonorina asked 4/1, 2023 at 19:24
2
I need to add the column for table that if the column is not existed.
I ran the Alter Table <table> add <column_name> <type>; however, it will have this error message if the colum...
2
Hi is there any way I can use != operator using CQL in Cassandra?
I am trying to use a != operator on my columnfamily but when I try using that it says:
cqlsh:EPCContent> select * from "MediaCa...
7
Solved
Full-Text search in Cassandra;
I am fairly new to Cassandra, and wish to understand it more properly. I am attempting to perform a Full-Text search in Cassandra, but after some research I have fou...
Consumable asked 21/7, 2014 at 5:18
7
Solved
I am wondering how can I achieve pagination using Cassandra.
Let us say that I have a blog. The blog lists max 10 posts per page. To access next posts a user must click on pagination menu to acces...
Troublous asked 5/11, 2014 at 12:31
4
Solved
Is there an easy way to check if table (column family) is defined in Cassandra using CQL (or API perhaps, using com.datastax.driver)?
Right now I am leaning towards executing SELECT 1 FROM table a...
3
Solved
We are using Cassandra as the data historian for our fleet management solution. We have a table in Cassandra , which stores the details of journey made by the vehicle. The table structure is as giv...
3
I have a table/columnfamily in Cassandra 3.7 with sensordata.
CREATE TABLE test.sensor_data (
house_id int,
sensor_id int,
time_bucket int,
sensor_time timestamp,
sensor_reading map<int, f...
2
Solved
Try to return all rows where a specific field is null or not null.
select * from ADDRESS where addr1 = null;
or
select * from ADDRESS where addr1 = 'NULL';
addr1 can be a boolean or text ...
3
Solved
I have a table 'reviews' in Cassandra as mentioned below:
CREATE TABLE reviews (
review_id text,
downcount int,
upcount int,
creation_date timestamp,
PRIMARY KEY (review_id)
)
Lets say I wa...
5
Solved
I have started working with Cassandra database. I am planning to use Datastax API to upsert/read into/from cassandra database. I am totally new to this Datastax API (which uses new Binary protocol)...
Thermoluminescence asked 19/4, 2013 at 1:57
3
Solved
In the CQL shell, how do I list all users? I can't seem to find it anywhere on Stack Overflow.
4
I am new with Cassandra CQL, I want to get the Cassandra query execution time. Can i do it in CQL shell by storing the current time in the variable, execute the query and then store the current tim...
Extrovert asked 3/12, 2015 at 20:11
2
Solved
I'm trying to do a simple select in Cassandra CQL3 containing a hardcoded value (constant) under a constant column name and I simply can't get it working
Here's the query
SELECT 1 as "id"
Works ...
2
Solved
The keyspace and 'person' table are exist
Hello, I'm new with Cassandra, so I'm just trying to execute select query from my java code, but I got an exception that the table is not exist (but it ex...
Ayres asked 2/3, 2016 at 20:20
2
Solved
I'm logging in with on Ubuntu 14.10 on Cassandra 2.0.8 with Java 1.7.0_60-b19
cqlsh -u cassandra -p cassandra
I'm running:
CREATE USER a WITH PASSWORD 'a' NOSUPERUSER;
I'm getting the error:
...
5
Solved
How can I write a query to find all records in a table that have a null/empty field? I tried tried the query below, but it doesn't return anything.
SELECT * FROM book WHERE author = 'null';
2
Solved
There's some patchy information on the interwebs about some examples when column type can't be changed. For example, on the DataStax site there's a mention:
Changing the type of a clustering colu...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.