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
1
vote
1 answer

Phpcassa - I'm struggling to understand this snippet of code

I'm still trying to wrap my head around the whole concept of composite keys in cassandra. I picked up this piece of code from https://github.com/thobbs/phpcassa/blob/master/examples/composites.php and I am struggling to understand what this means…
Sthe
  • 2,575
  • 2
  • 31
  • 48
1
vote
2 answers

what is the reason for composite column, there must be at least one column which is not part of the primary key

From online document: A CQL 3 table’s primary key can have any number (1 or more) of component columns, but there must be at least one column which is not part of the primary key. What is the reason for that? I tried to insert a row only with the…
Wei Zhu
  • 617
  • 1
  • 7
  • 14
1
vote
2 answers

Apache Cassandra: got TTransportException when using JDBC

I am getting the following error when I connect to the Apache Cassandra database using CQL JDBC driver (cassandra-jdbc-1.1.2). I am getting the error only when I'm trying to execute UPDATE statement, SELECTs are working fine. Also I can connect to…
Emil Gotsev
  • 223
  • 2
  • 12
1
vote
1 answer

Cassandra CQL 3 strange behaviour. Error making delete queries

Today I decided to use CQL and unfortunately I came accross MANY problems with CQL 3 and Composite column. One of them which I hadn't solve was following: I have table with 4 composite primary keys. Let's name them c_key0, c_key1, c_key2, c_key3. I…
Kamen Stoykov
  • 1,715
  • 3
  • 17
  • 31
1
vote
1 answer

Crash in Cassandra-CLI

I created a table in CQLsh -3.0 and inserted values into it. create table users ( Id uuid PRIMARY KEY, Name varchar, Age int ); insert into users(Id, Name, Age) values ('001', 'XYZ', '30'); cqlsh:usertable> select * from users; id …
vinay sudhakar
  • 200
  • 1
  • 10
1
vote
1 answer

How to improve the performance for indexing data in cassandra

Cassandra doesn't have some CQL like like clause.... in MySQL to search a more specific data in database. I have looked through some data and came up some ideas 1.Using Hadoop 2.Using MySQL server to be my anther database server But is there any…
LiJung
  • 7,649
  • 6
  • 27
  • 30
1
vote
2 answers

select compositetype keys in cassandra

So I've defined a column family that uses composite ids for the row keys. So say the composite key is CompositeType(LongType,LongType). So I've tested storing items with this type and that works fine and SELECT works as expected too when I know the…
user1084563
  • 2,149
  • 17
  • 28
1
vote
1 answer

"SELECT * FROM cf" only returning indexed columns in Cassandra using Helenus for NodeJS

I am new to Cassandra, so I might be missing something very simple. I started off with a simple nodejs application that retrieves and displays all rows from a columnfamily. And if I run the following: pool.connect(function(err, keyspace){ …
HyderA
  • 20,651
  • 42
  • 112
  • 180
1
vote
3 answers

Kundera for Cassandra - Deleting record by row key

I'm trying to delete specific record from database by row key. But when I try to execute this query: Query query = em.createQuery( "DELETE FROM User u WHERE u.userId = :u"); query.setParameter("u", userID).executeUpdate(); I got this…
ShP
  • 1,143
  • 1
  • 12
  • 41
1
vote
1 answer

FluentCassandra selecting timestamp range with CQL

I have a method in my DAL that selects objects with CQL query. I'm trying to pass time interval as follows: //FilterStartTime, FilterEndTime are of type DateTime, stored in config // converting DateTime to unix timestamp var start = (FilterStartTime…
Jaded
  • 1,802
  • 6
  • 25
  • 38
1
vote
2 answers

creating column family in cql?

when i create column family using the cql it gives me very unexpected output. public static void createColumnfamily() { try { Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver"); Connection con…
Sunil Kumar
  • 1,349
  • 3
  • 14
  • 25
1
vote
1 answer

OpenLayers: filter radius

I am trying to filter a points layer to only show points within a given radius. I have determined the best method to do this is a CQL_FILTER using DWITHIN. When I set this param and then load the map, I get broken tiles. Here is the snippet of my…
user1480902
  • 25
  • 1
  • 4
1
vote
2 answers

cassandra 1.1.1 default cql version

Do someone know if it is possible to set in Cassandra (1.1.1) configuration CQL3 as default for connections? I know that you can set it in cqlsh with --cql3, or in java Cassandra client, but that is not what I need. The problem is that it cannot be…
trj
  • 77
  • 1
  • 12
1
vote
1 answer

Lists in NoSQL/BigTable Data Modeling & Super Columns (with Cassandra)

I'm new to NoSQL and BigTable, and I'm trying to learn how I can (and if should) use super columns to create a BigTable friendly schema. Based on this article about NoSQL data modeling, it sounds like instead of using JOIN-centric RDBMS schemas, I…
David Elner
  • 5,091
  • 6
  • 33
  • 49
1
vote
1 answer

Store XML HTML Word in Cassandra

I want to store different contents into the Cassandra database. Example: I would consume a RSS feed and then store it in the Database. Similarly i would like to store HTML and Word documents in to the Cassandra database. I also searched and found…
clklachu
  • 951
  • 1
  • 7
  • 19