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
4
votes
1 answer

Cassandra `COPY FROM`unable to coerce GMT date string to a formatted date (long)

I have been trying to use COPY FROM to insert into a Cassandra table that has a timestamp type column. However, I encountered the following error: code=2200 [Invalid query] message="unable to coerce '2015-03-06 18:11:33GMT' to a formatted date…
WillZ
  • 3,775
  • 5
  • 30
  • 38
4
votes
2 answers

Why does cqlsh right-align strings?

I find that string-values displayed using cqlsh are right-aligned. Is there a reason for this? And is there a way to left-align strings? cqlsh:test> create table test (id int, a ascii, t text, primary key(id)); cqlsh:test> insert into test (id, a,…
tbsalling
  • 4,477
  • 4
  • 30
  • 51
4
votes
3 answers

disable compaction and gc grace on cassandra

I am always inserting data PRIMARY KEY ((site_name,date),time,id) while the site_name and date can be same the time which is a tamed field and id(uuid) is different. So I always add new data. Data is inserted with TTL (Currently 3 days). So as i…
Mark
  • 833
  • 1
  • 9
  • 27
4
votes
2 answers

unable to coerce '2012/11/11' to a formatted date (long)

I am new to Cassandra cql (cqlsh 4.1.1, Cassandra 2.0.8.39, CQL spec 3.1.1, Thrift protocol 19.39.0) - using the cql COPY command to a table from a CSV formatted file and I get the following error: Bad Request: unable to coerce '2012/11/11' to a…
Frank
  • 41
  • 1
  • 3
4
votes
4 answers

how to get the list of all table of a key space in cassandra

I am new to cassandra, I am currently using CassandraCSharpDriver in a dummy application. I want to get the list of all the tables a user has described in a given key space. Cluster cluster =…
Sameer Rathoud
  • 133
  • 3
  • 8
4
votes
3 answers

cqlsh getting started gives invalid syntax

I'm following http://wiki.apache.org/cassandra/GettingStarted The first thing I do in cqlsh is cqlsh> CREATE KEYSPACE mykeyspace WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1 }; Invalid syntax at line 1, char 47 CREATE…
shmish111
  • 3,697
  • 5
  • 30
  • 52
4
votes
1 answer

CQL: comparing two column values

I have a TABLE like this: id | expected | current ------+----------+-------- 123 | 25 | 15 234 | 26 | 26 345 | 37 | 37 Now I want to select all ids where current is equal to expected. In SQL I would…
matthisb
  • 1,108
  • 12
  • 29
4
votes
2 answers

Getting "unable to complete request: one or more nodes were unavailable" when performing insert statement using cqlsh

I'm trying to perform an insert on a brand new install of Cassandra 2, and while I was able to set up a new keyspace and table just fine, I get the eror mentioned above when attempting to perform an insert. I dont' have any fancy multi server setup,…
canadiancreed
  • 1,966
  • 6
  • 41
  • 58
4
votes
1 answer

Trying to login to cassandra's console (cqlsh) and it rejects me

I was trying to set up the user authentication for cassandra when I had the following problem. First I have updated the cassandra.yaml with: authenticator: PasswordAuthenticator then created the system_auth keyspace with a replication_factor of 3…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
4
votes
1 answer

CQLSH Connection Error: Bad Request: unconfigured columnfamily local

I am trying to setup CQLSH on Windows. I did the python compilation and trying to start CQLSH, I get this weird error below. I dont have a columnfamily by name 'local'. And I havent specified my keyspace yet. So why does it complain that I dont have…
jeera
  • 591
  • 1
  • 7
  • 15
4
votes
1 answer

what are cqlsh tracing entries meaning?

activity | timestamp | source |…
Zer001
  • 619
  • 2
  • 8
  • 18
3
votes
1 answer

How can we run flyway/migrations script inside Cassandra Dockerfile?

My docker file FROM cassandra:4.0 MAINTAINER me EXPOSE 9042 I want to run something like when cassandra image is fetched and super user is made inside container. create keyspace IF NOT EXISTS XYZ WITH REPLICATION = { 'class' : 'SimpleStrategy',…
3
votes
2 answers

Why do native CQL functions like MIN() and MAX() not work in Amazon Keyspaces?

I'm trying to retrieve the max value of a column in my aws keyspace table using python. I have it as a method in a class query = SimpleStatement('select min (timestamp) from ' + keyspace + '.'+ table_name) #+ ' limit 2' read =…
airdmhund
  • 43
  • 4
3
votes
1 answer

Cassandra's cqlsh not able to connect to any servers: Last error: [SSL] internal error (_ssl.c:727)")

All of a sudden a previously working docker deployed cluster stopped accepting any connections: cqlsh --debug --ssl -u -p ... Using CQL driver:
Andremoniy
  • 34,031
  • 20
  • 135
  • 241