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
10
votes
2 answers

Is it possible to use variables in cql commands in cql scripts?

Is there a way to pass variables in CQL commands when being used in CQL scripts like: select * from "Column Family Name" where "ColumnName"='A variable which takes different values'; Any suggestions are welcome.
schatter
  • 151
  • 1
  • 11
8
votes
1 answer

Connecting python to cassandra a cluster from windows with DseAuthenticator and DseAuthorizer

I've tried both with pycassa, cassandra.cluster and dse.cluster without making a connection. I feel like I'm connecting to the wrong host, as I'm writing the linux servers hostname and not specifying anything regarding the cassandra. Collegues have…
MadsVJ
  • 678
  • 6
  • 19
8
votes
2 answers

Warning on starting cqlsh

The following warning appears every time I start cqlsh: WARNING: pyreadline dependency missing. Install to enable tab completion. How do I fix this?
bunny
  • 115
  • 1
  • 9
8
votes
6 answers

Error during inserting data: NoHostAvailable:

I try to learn basics of Apache Cassandra. I found this simple example of application at https://docs.datastax.com/en/cql/3.1/cql/ddl/ddl_music_service_c.html So I created a keyspace, then I created a table, and now I am trying to add some data to…
doubleB
  • 348
  • 2
  • 11
8
votes
4 answers

Cassandra Query execution time analysis

I am new with Cassandra CQL, I want to get the Cassandra query execution time. Can i do it in CQL shell by storing the current time in the variable, execute the query and then store the current time in another variable and calculate the actual…
Bilal Ehsan
  • 107
  • 1
  • 5
8
votes
2 answers

COPY cassandra table from csv file

I'm setting up a demo landscape for Cassandra, Apache Spark and Flume on my Mac (Mac OS X Yosemite with Oracle jdk1.7.0_55). The landscape shall work as a proof of concept for a new analytics platform and therefore I need some test data in my…
siliconchris
  • 613
  • 2
  • 9
  • 22
8
votes
4 answers

specify cqlsh output timezone

I have a table in cassandra with a datatype of timestamp. i am using cqlsh to get data out of the database and wanted to change the output format for how my timestamp column output looks like. I researched around and found that i can change the…
Neeraj B.
  • 455
  • 1
  • 6
  • 12
7
votes
3 answers

cqlsh ERROR:root:code for hash md5 was not found

I am unable to use cqlsh on mac. below is my system info and error log I am getting. os : mac cassandra : apache-cassandra-3.9 python :2.7.16 jave . : 1.8 cqlsh $ cqlsh ERROR:root:code for hash md5 was not…
nagendra patod
  • 289
  • 2
  • 8
7
votes
1 answer

PicklingError when copying a very large cassandra table using cqlsh

When I try to copy a table to cassandra using the command: copy images from 'images.csv' I get the error: 'PicklingError: Can't pickle : attribute lookup cqlshlib.copyutil.ImmutableDict failed' I have…
Robert Nelson
  • 115
  • 2
  • 7
7
votes
5 answers

NoHostAvailable error in cqlsh console

I was able to get rid of this error later but i am not sure what i did is correct. 1 ) CREATE KEYSPACE myKeySpace WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '1', 'dc2': '2'} AND durable_writes = true; Execute create table…
jAvA
  • 557
  • 1
  • 8
  • 22
7
votes
2 answers

Cassandra NoHostAvailable: error in CQLSH

I just finished creating my table in cassandra. I attempted to insert data into the table and I was given this error: cqlsh:test> INSERT into qw (id, user, pass, email, phoneNum) VALUES (1, 'scman',…
Connor Myers
  • 111
  • 1
  • 1
  • 7
7
votes
1 answer

Cassandra - Delete not working

Sometimes; when I perform a DELETE; it doesn't work. My config : [cqlsh 5.0.1 | Cassandra 3.0.3 | CQL spec 3.4.0 | Native protocol v4] cqlsh:my_db> SELECT * FROM conversations WHERE user_id=120 AND conversation_id=2 AND peer_type=1; user_id |…
Belgikoi
  • 565
  • 2
  • 5
  • 13
7
votes
3 answers

cassandra:: can i create a table without a primarykey?

Now i'm learning Cassandra, so i got a table without primary key. But it has some indexes. So this is my doubt, can i create a table without primary key.? CREATE TABLE subscription (subscriberid varchar,productid varchar,panaccessproductid…
Renjith V R
  • 2,981
  • 2
  • 22
  • 32
7
votes
1 answer

Is there a way to display results in a pager in Cassandra cqlsh?

If the output of a query cannot be properly displayed within the dimensions of the terminal used to issue the query, the ASCII-art used to draw the table layout usually breaks and becomes a more of a hinderance than a help when trying to read the…
aef
  • 4,498
  • 7
  • 26
  • 44
7
votes
3 answers

CASSANDRA CQL3 : Set value to entire column

For my Cassandra Database, I need to set a value in column for all rows in my table. I see in SQL, we can do : UPDATE table SET column1= XXX; but in CQL (in cqlsh), It doesn't work ! I don't want to update row by row until 9500 rows. Do you have…
Quentin DESBOIS
  • 123
  • 1
  • 1
  • 9