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
5
votes
3 answers

View Cassandra Partitions using CQLSH

Using Cassandra, how do i see how many partitions were created base on how i created the primary key? I have been following a tutorial and it mentions to go to bin/cassandra-cli and use the LIST command. However, the latest Cassandra install does…
BigBug
  • 6,202
  • 23
  • 87
  • 138
5
votes
1 answer

how to do arithmetics with datetimes in CQL

My objective, is to remove a fixed amount of time, from now(). So I always get the last five minutes, or the last five hours. How can I achieve it ? The documentation on cassandra says: A duration can be added (+) or substracted (-) from a…
Micka
  • 1,648
  • 1
  • 19
  • 34
5
votes
4 answers

Cassandra: Command Not Found

I am currently working on the Cassandra tutorials about data modeling. I cannot understand why whenever I try to run the cassandra service from the bin folder I receive the error: "Cassandra: command not found". The same happens if I try to run…
npof75
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

Using cqlsh with ssl

I have enabled ssl encryption in my cassandra node and I am trying to figure out how to connect to my node using cqlsh with ssl: When I run ./cqlsh --ssl I get the following error: Validation is enabled; SSL transport factory requires a valid…
user1692342
  • 5,007
  • 11
  • 69
  • 128
5
votes
3 answers

Cassandra query with equals operator on timestamp column not working

I have created a table as follows in Cassandra: CREATE TABLE sp.status( ams text, load_start_time timestamp, file_path text, file_timestamp timestamp, host text, load_end_time timestamp, records_ignored int, records_imported int, records_in_file…
dragosb
  • 607
  • 8
  • 25
5
votes
2 answers

Cassandra COPY consistently fails

I was trying to import a CSV with about 20 million rows. I did a pilot run with a few 100 rows worth of CSV just to check if the columns were in order and that there were no parsing errors. All went well. Every time I tried importing the 20 million…
Dojo
  • 5,374
  • 4
  • 49
  • 79
5
votes
2 answers

Discrepancy between Cassandra trace and client-side latency

We're on Cassandra 2.0.15, and seeing huge read latencies (>60sec) coming up at regular intervals (about every 3min), from all app hosts. We measure this latency around calls to session.execute(stmt). At the same time, Cassandra traces report…
Yuri Shkuro
  • 564
  • 1
  • 3
  • 15
5
votes
2 answers

Can cassandra compaction strategy be changed dynamically?

I am quite new to using Cassandra and have a basic question that I was seeking an answer to. I am using the default compaction strategy which the Size-Tiered. I am aware that this can be changed to the Levelled Compaction strategy by running a…
Rohit
  • 523
  • 2
  • 6
  • 25
5
votes
2 answers

cqlsh equivalent to mysql -e

I'm trying to create a small shell script where it would be very handy for me to run a command directly from the command line via cqlsh. In MySQL I could do something like: mysql -u root -e "show databases;" Is there a cqlsh equivalent to -e, or…
pcalcao
  • 15,789
  • 1
  • 44
  • 64
5
votes
2 answers

Copy From CSV - COLUMN FAMILY NOT FOUND

I've spent the past two days checking the available answers on this site and a few other sites. I need help with the following (COPY FROM a CSV file) issue I'm encountering. I created the KEYSPACE and COLUMN FAMILY without any issues, but I receive…
Cary
  • 51
  • 1
  • 4
5
votes
1 answer

Cassandra 2.0.3 client-to-server [TSocket reads 0 bytes] error

I want to enable authorization, authentication, Client/server encryption and internode encryption in Cassandra 2.0.3.. Unfortunately, this doesn't seem to be happening as all security configurations are working fine but when i enable "Client/server…
user1540371
  • 99
  • 2
  • 9
4
votes
1 answer

ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes

I am getting below error on, ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses':…
Abhishek
  • 1,543
  • 3
  • 13
  • 29
4
votes
2 answers

Passing local CQL commands file to Cassandra Docker container

Is it possible to pass a local file for CQL commands to a Cassandra Docker container? Using docker exec fails as it cannot find the local file: me@meanwhileinhell:~$ ls -al -rw-r--r-- 1 me me 1672 Sep 28 11:02…
MeanwhileInHell
  • 6,780
  • 17
  • 57
  • 106
4
votes
7 answers

cassandra copy [Errno 13] Permission denied

Cassandra newbie here. I have just set up a proof of concept single node machine on Red Hat Linux. I finally got all of the permissions correct and started up the machine. I then created a keyspace called harvard, issues the use command to switch…
user2297683
  • 406
  • 1
  • 5
  • 15
4
votes
3 answers

Run cassandra queries from command line

I want to execute cql queries from bash command. [cqlsh 3.1.8 | Cassandra 1.2.19 | CQL spec 3.0.5 | Thrift protocol 19.36.2] [root@hostname ~]# /opt/apache-cassandra-1.2.19/bin/cqlsh -k "some_keyspace" -e "SELECT column FROM Users where…
4EACH
  • 2,132
  • 4
  • 20
  • 28