Questions tagged [cqlsh]

cqlsh is a python-based command line client for executing Cassandra Query Language (CQL)

cqlsh is 'a python-based command line client for executing Cassandra Query Language (CQL) commands'1. It provides a quick and easy way to run simple CQL commands interactively. It has been available in the DataStax Community version of Cassandra since version 1.0.1.

The reference manual associated with CQL specification is here. Instructions for using cqlsh with Cassandra 1.0 can be found here.

803 questions
0
votes
2 answers

Create a user-defined type with Cassandra

I am trying to create a user defined type with Cassandra. I am using cqlsh and the example provided in the documentation (http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/cqlRefcreateType.html): REATE TYPE address ( street text, …
Spearfisher
  • 8,445
  • 19
  • 70
  • 124
0
votes
1 answer

Why do these CQL3 queries with where-clauses against a table (with a compound key) fail to return anything?

I get no rows back with any kind of CQL3 query with a where clause against this table: CREATE TABLE mydata ( key1 text, key2 int, key3 int, key4 int, statustime timestamp, status text, name text, PRIMARY KEY ((key1, key2, key3,…
marathon
  • 7,881
  • 17
  • 74
  • 137
0
votes
1 answer

How to model cassandra columnfamily

Is the below select queries are possible for the columnfamily I have defined, because I am getting a bad request error. How should I Model my columnfamily to get the correct results. CREATE TABLE recordhistory ( userid bigint, objectid bigint, …
Aftab
  • 938
  • 1
  • 9
  • 20
0
votes
1 answer

rpc timeout on insert with no error in logs

I have a rpc_timeout on a insert of one single row (the cluster is with 3 nodes, and can handle more than 10000 insert / min on another table) Here is the table : CREATE TABLE test_table ( agent text, run_id text, process_id text, …
tahir
  • 1,016
  • 1
  • 11
  • 21
0
votes
1 answer

Batch update by "update" query of cqlsh in Cassandra

I want to do batch update for all rows, using update query. I know there is BATCH query. But, I have to list all rows.. So, I want to do something like : UPDATE test set value=0x31 where id in ( SELECT id from test ); Is there any way doing…
user2533493
  • 81
  • 2
  • 12
0
votes
1 answer

Cassandra and cqlsh - "Cassandra unknown" and "CQL spec unknown"

I just downloaded Cassandra 1.0.10 and Java 1.6.0_45 on Ubuntu. When I run the command cqlsh on terminal, I get the following output: Connected to Test Cluster at localhost:9160. [cqlsh 2.0.0 | Cassandra unknown | CQL spec unknown | Thrift protocol…
jj172
  • 751
  • 2
  • 9
  • 35
0
votes
1 answer

Cassandra: How to delete selected entries after copy in cqlsh?

Following is my problem. I'm running list of cql commands with ./cqlsh localhost 9160 -f $TEXT_FILE In the text file I have commands for copying column family1 to column family2 using the COPY command as below. COPY sample (name,score,create_at) TO…
Poppy
  • 2,902
  • 14
  • 51
  • 75
0
votes
1 answer

order by caluse not working in cassandra CQLSH

I want query similar to this SELECT uuid,data,name,time,tracker,type,userid FROM standardevents080406 ORDER BY userid DESC; but it is not working where as simple where clause queries are working. SELECT uuid,data,name,time,tracker,type,userid FROM…
Helping Hand..
  • 2,430
  • 4
  • 32
  • 52
0
votes
2 answers

How data is stored in cassandra composite key Column Family

I am facing some peculiar problem in DSE 3.2.4, here is my table structure, CREATE TABLE tbl_samp ( PK text, CK1 varint, CK2 text, CK3 varint, value float, PRIMARY KEY (PK, CK1, CK2, CK3) ) WITH bloom_filter_fp_chance=0.010000 AND …
sudheer
  • 338
  • 1
  • 6
  • 17
0
votes
1 answer

CQL2/CQL3 Cassandra Error on PHP

While executing this code in PHP: $db_nosql = new PDO('cassandra:host=127.0.0.1;port=9160;cqlversion=3.0.0'); I got a error message: Fatal error: Uncaught exception 'PDOException' with message 'CQLSTATE[HY000] [2] Cannot execute/prepare CQL2…
0
votes
1 answer

Cassandra: create JSON column using cdlsh

lets say I have a a table when one of the columns is JSON. like a:text b:text c: How could I define such table in Cassandra so I will be able to make select * from table where c.d=something??
Alexey
  • 179
  • 1
  • 2
  • 10
0
votes
1 answer

DataStax Enterprise 4.5 on RHEL / CentOS 7 won't fully install cqlsh

When trying to install DataStax Enterprise from the yum repository, cqlsh won't actually install because it depends on python 2.6 while RHEL/CentOS now ships with python 2.7 and removed 2.6. It seems it should also be able to accept python 2.7, as…
0
votes
2 answers

Why cassandra/cql restrict to use where clause on a column that not indexed?

I have a table as follows in Cassandra 2.0.8: CREATE TABLE emp ( empid int, deptid int, first_name text, last_name text, PRIMARY KEY (empid, deptid) ) when I try to search by: "select * from emp where first_name='John';" cql shell…
Arosha
  • 81
  • 1
  • 6
0
votes
1 answer

Strange behavior of timeuuid comparison

I have Cassandra 2.x cluster with 3 nodes and the db scheme like this: cqlsh> CREATE KEYSPACE test_ks WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 3} AND durable_writes = true; cqlsh> CREATE TABLE IF NOT EXISTS…
Dmitry Belaventsev
  • 6,347
  • 12
  • 52
  • 75
0
votes
1 answer

Importing CSV to Cassandra DB

I am trying to import a .csv file to Cassandra by using the COPY command in the CQL. The problem is that, after executing the command, the console displays that '327 rows imported in 0.589 seconds' but only the last row from the csv file gets into…
jigargm
  • 155
  • 3
  • 15