Questions tagged [cql3]

Cassandra Query Language (CQL) is a SQL (Structured Query Language)-like language for querying Cassandra.

Cassandra Query Language (CQL) is a SQL (Structured Query Language)-like language for querying Cassandra.

Although CQL has many similarities to SQL, there are some fundamental differences.

For example, the CQL adaptation to the Cassandra data model and architecture, doesn't support operations, such as JOINs, which make no sense in a non-relational database.

657 questions
0
votes
1 answer

Recovering date from cassandra sstable2json

I am trying to recover timestamp from a sstable2json dump of a cassandra table for batch processing. The table schema looks something like this: CREATE TABLE actions ( userid text, action text, ts timestamp, PRIMARY KEY (userid, ts) ) WITH…
Pradeep
  • 351
  • 3
  • 5
0
votes
1 answer

Gradle plugin to execute cql3 scripts

I have a requirement to execute CQL3 scripts through Gradle, do we have any cassandra plugin for Gradle to do the same or is there any other way I can execute CQL3 scripts during the build itself. Please suggest. Dawood
Dawood
  • 301
  • 1
  • 5
  • 12
0
votes
1 answer

How to understand CQL3 table model from scratch?

I recently visited http://cassandra.apache.org/doc/cql3/CQL.html#CQLSyntax and just read this: [...] please note that as such, they do not refer to the concept of rows and columns found in the internal implementation of Cassandra and in the…
Abu Abuu
  • 25
  • 3
0
votes
1 answer

Versioning in cassandra

I have a requirement of versioning to be done using cassandra. Following is my column family definition create table file_details(id text primary key, fname text, version int, mimetype text); I have a secondary index created on fname…
Dawood
  • 301
  • 1
  • 5
  • 12
0
votes
1 answer

cassandra columnfamily with text order like int

I have a Column Family like this: image_index type as text and primary key value as text id_image as text I do a SELECT * FROM image_index WHERE type = "image_by_size" ORDER BY value DESC; Is it possible to compare text like is a int?
Jacky Lormoz
  • 165
  • 2
  • 11
0
votes
2 answers

What is the correct data model for storing user relationships in Cassandra (i.e. Bob follows John)

I have a system where actions of users need to be sent to other users who subscribe to those updates. There aren't a lot of users/subscribers at the moment, but it could grow rapidly so I want to make sure I get it right. Is it just this…
Jay
  • 19,649
  • 38
  • 121
  • 184
0
votes
1 answer

PRIMARY KEY definition in Cassandra 1.2 using CQL 3

I am newbie in Cassandra and following this Cassandra tutorial on youtube. In this tutorial, author is creating two tables as shown below: create table children(childid varchar, firstname varchar, lastname varchar, country varchar, state varchar,…
Shekhar
  • 11,438
  • 36
  • 130
  • 186
0
votes
2 answers

How to get data types from a Astyanax CQL Query

I am using Astyanax to query Cassandra using CQL3 queries, and it is working fine. I only want to make queries (SELECT ...), and I am using the following code for example: AstyanaxContext context = new AstyanaxContext.Builder() …
eLRuLL
  • 18,488
  • 9
  • 73
  • 99
0
votes
1 answer

CCE: BinSedesTuple cannot be cast to String

I am trying to process the following data: B = FOREACH A GENERATE FLATTEN( vitalStatus); DUMB B; (value,LIVING) (value,LIVING) (value,LIVING) (value,DECEASED) (value,LIVING) (value,DECEASED) (value,DECEASED) (value,LIVING) But when I try to filter…
e90jimmy
  • 272
  • 1
  • 2
  • 11
0
votes
2 answers

How to select * from users where key IN (<$array>); with PHP and Cassandra-PDO (cql3)?

I'm using https://github.com/Orange-OpenSource/YACassandraPDO as PDO extension, all works fine, but when i try to get records by clause select * from users Where key IN ($my_keys_array) just retrieves the first record. $query = "SELECT * FROM…
jezuz
  • 413
  • 2
  • 5
  • 13
0
votes
1 answer

Astyanax getKey with compound key

I would like to run the following code with a compound primary key. Column result = keyspace.prepareQuery(CF_COUNTER1) .getKey(rowKey) .getColumn("Column1") .execute().getResult(); Long counterValue =…
Peter Klipfel
  • 4,958
  • 5
  • 29
  • 44
0
votes
1 answer

Cassandra CQL DataType Advantages and Disadvantages

I am looking into using Cassandra CQL 3.0 and was reading over the various datatypes provided for tables (or column families). See here for a list of the datatypes: CQL Datatypes. My questions is what are some advantages and disadvantages of the…
Justin Sweeney
  • 133
  • 1
  • 1
  • 7
0
votes
1 answer

Selecting index from Cassandra list collection

I was curious if it's possible to SELECT a specific index from a list collection in Cassandra. Say I have: CREATE TABLE users ( user_id text PRIMARY KEY, order_list list ); UPDATE users SET ordered_list = [ 'thing1', 'thing2',…
somecallmemike
  • 441
  • 1
  • 8
  • 19
0
votes
1 answer

With CQL3 and comparator getting EOF error on create table

I try running the following create table in cqlsh: CREATE TABLE measurements (metricid uuid, appid uuid, sourceid uuid, tagid uuid, day int, type int, PRIMARY KEY (metricid, appid, sourceid, tagid, day, type) WITH comparator=uuid); I receive…
AlexGad
  • 6,612
  • 5
  • 33
  • 45
0
votes
1 answer

Hector support for CQL3 specific features (Partition & Clustering keys) and Compact Storage option

I'm trying to leverage a specific feature of Apache Cassandra CQL3, which is partition and clustering keys for tables which are created with compact storage option. For Eg. CREATE TABLE EMPLOYEE(id uuid, name text, field text, value text, primary…
Kathir
  • 27
  • 7