657 questions
0
votes
1
answer
411
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 ...
1
vote
1
answer
44
views
Cassandra - get the latest value within group
Let's say I have the following table which possibly contains dozens of millions of rows and thousands of guids:
| Guid | Measurement time | Signal |
| ------ | ---------------- | ------ |
| xxx1 | ...
0
votes
1
answer
283
views
Cassandra map and column update regarding tombstones
I have this following table:
CREATE TABLE example
(
id text,
users map<text,text>,
lastvisit int,
...
PRIMARY KEY (userid)
);
Sometimes I update a column or a map entry like:...
2
votes
2
answers
402
views
Cassandra chat app: sorting rooms after last message inserted
For a messaging app I have a database structure comparatively to:
CREATE TABLE users(
userid text,
name text,
rooms list<text>
...
PRIMARY KEY (userid)
);
CREATE TABLE ...
0
votes
1
answer
125
views
Cassandra need for IN clause in consideration of a messaging application
For a messaging app i have a database structure comparatively to:
CREATE TABLE users(
userid text,
name text,
rooms list<text>
...
PRIMARY KEY (userid)
);
CREATE TABLE ...
0
votes
1
answer
672
views
CQL query delete if not in list
I am trying to delete all rows in the table where the partition key is not in a list of guids.
Here's my table definition.
CREATE TABLE cloister.major_user (
user_id uuid,
user_handle text,
...
2
votes
1
answer
553
views
In Cassandra, why dropping a column from tables defined with compact storage not allowed?
As per datastx documentation here, we cannot delete column from tables defined with COMPACT STORAGE option. What is the reason for this?
1
vote
1
answer
1k
views
Filtering on Primary Key in Cassandra
I have the following table:
CREATE TABLE tab1 (id int PRIMARY KEY, price int, name text);
The following queries return errors:
SELECT name FROM tab1 WHERE id > 5;
SELECT name FROM tab1 WHERE id &...
1
vote
1
answer
932
views
Cassandra, Delete if a set contains value
I'm a beginner in Cassandra and I have a table like this:
CREATE TABLE Books(
Title text PRIMARY KEY,
Authors set<text>,
Family set <text>,
Publisher text,
Price decimal
);
(the other ...
1
vote
1
answer
2k
views
How to pass to @Query a complete query String?
Using the @Query from org.springframework.data.cassandra.repository.Query, I would like to make a custom query and pass it to my Repository and then from the parameter to the @Query annotation.
My ...
2
votes
0
answers
336
views
CQL: Escape single quote in a map<int,text> attribute
For text attributes, CQL allows escaping single quote using additional single quote. But applying the same syntax for a map<int,text> attribute does not work.
CREATE query:
CREATE TABLE ...
1
vote
2
answers
2k
views
How can i update the column to a particular value in a cassandra table?
Hi I am having a cassandra table. my table has around 200 records in it . later i have altered the table to add a new column named budget which is of type boolean . I want to set the default value to ...
4
votes
2
answers
2k
views
How to get generated Id after inserting row in Cassandra
I am trying to insert insert some rows sharing a row-id and decided to stick with time-based uuids. All documentation i could find explained how to create such a row:
INSERT INTO users (id, name) ...
0
votes
1
answer
293
views
Will auto-pagination work in Cassandra without providing the limit?
After reading doc(driver doc) and few answers, it seems that Cassandra 2.0+ has an auto paging. But all such examples included LIMIT keyword.
Does this query applicable in auto-paging:
...
3
votes
1
answer
978
views
How to properly select partition keys that match an index
I try to select the partition keys that contain at least one row with a specific value in an indexed column.
With the current solution all the other requirements are met:
Ability to select reports ...