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

Cassandra: Populating a new column in cql

I have added a new column to my admin table.I want to populate revision column against effective_date column. ALTER TABLE prod.admin ADD revision int; The revision number will start with 100 and increment by 1. The revisions will be based…
saurav
  • 219
  • 1
  • 13
0
votes
1 answer

Script to copy one column data to another column

I am writing a script to copy one column data to another column. Tried with following logic bud didnt worked out- o/p- number of parameter is 0. My Logic- • I got the keys from the admintable and then copied the data to some updateupdateStatement…
saurav
  • 219
  • 1
  • 13
0
votes
1 answer

Insert into in python cql throwing syntax error

I tried creating table in cassandra using the following code in python CREATE TABLE videos( id uuid, added_date TEXT, title text, PRIMARY KEY(id)); I tried to insert values using the following code INSERT INTO…
Balajee
  • 143
  • 1
  • 2
  • 13
0
votes
1 answer

Cqlsh query for wildcard characters

I want a query to perform following operation List employees name either start or end with A but i seen on some sites that cassandra do not support wildcard characters is it true or not i also refered solr_query but cqlsh gives error undefined name…
Mohit Shaha
  • 11
  • 1
  • 3
0
votes
1 answer

difficulty while starting cqlsh shell

I want to start cqlsh shell but it gives me error like Connection error: Unable to connect to any servers', {'127.0.0.1': error(10061,"Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target…
Mohit Shaha
  • 11
  • 1
  • 3
0
votes
1 answer

Create table with many columns Cassandra 2

I need a table on Cassandra2 with 56K columns of 1 byte each, for benchmark purposes. I'm trying to create a "usertable" with this requirement like this: create table usertable ( y_id varchar primary key, field0 varchar, field1 varchar, …
vschettino
  • 101
  • 2
  • 9
0
votes
2 answers

Connection error while using cqlsh

I already installed Cassandra using synaptic in Ubuntu 15.10.Cassandra service is active .But when I type cqlsh in terminal.It is showing error like below. Connection error: ('Unable to connect to any servers', {'127.0.0.1':…
0
votes
1 answer

cassandra drop keyspace hangs forever

I try to drop a keyspace using cqlsh: drop keyspace test; It then hangs indefinitely. When I finally interrupt it, I can no longer use cqlsh. For example, this hangs too: describe keyspaces; I then have to restart cqlsh. When describing the…
Mat
  • 952
  • 2
  • 11
  • 28
0
votes
2 answers

Export data from Cassandra query to a file

I have x GB (x varies from 25-40 GB) of daily data which resides in the cassandra and i want to export it in a file. So, I came cross this SO link. Using which you can export the data of query having format to be like this : select column1, column2…
Naresh
  • 5,073
  • 12
  • 67
  • 124
0
votes
0 answers

Hector inserting only part of the primary key

I have a query in some legacy code that I want to understand. The Cassandra table is this: cqlsh:mykeyspace> desc table "logTable" CREATE TABLE mykeyspace."logTable" ( key text, key2 text, column1 text, column2 text, column3…
Serban Stoenescu
  • 3,136
  • 3
  • 22
  • 41
0
votes
1 answer

How to count the duplicate records in a table in cassandra

Let say my data is like below: Acct_id | amount --------|------- 10001 |6.00 20000 |5.00 32356 |1.00 10001 |2.00 45000 |1.50 45000 |10.00 My expected result should be like this: acct_id| count -------|----- 10001 | 2 45000 | 2 How do…
sandy
  • 1
  • 1
  • 6
0
votes
1 answer

Cassandra node down with AssertionError, IOException(broken pipe) and OutOfMemoryError(heap)

We are using Cassandra 2.0.3 of six nodes with two data centers (each has 3 nodes). One of our nodes is frequently down with the following contiguous errors. java.lang.AssertionError java.io.IOException: Broken pipe java.lang.OutOfMemoryError: Java…
0
votes
0 answers

Debugging Cassandra in CQLSH - ArrayIndexOutOfBoundsException

I am running some Cassandra queries. When I run select * from logtable; I get this error: However, if I run with limits, some rows are OK: select * from…
Serban Stoenescu
  • 3,136
  • 3
  • 22
  • 41
0
votes
2 answers

How Do input ssatbles into Cassandra after generating using java parser

I have a Java parser code Im running in Eclipse to generate 1GB of data and put in sstable format. Once complete how do I load sstables into my keyspace and cluster from terminal on windows machine. My cluster is running on my local machine. My…
JayLav
  • 101
  • 1
  • 8
0
votes
0 answers

using Latin1 encoded characters in cassandra

I'm working on a project where our database has to be able to handle spanish characters like 'á' or 'ñ' on words being inserted or queried. Right now whenever i run an insert command like the following from cqlsh: insert into test (name) values…
Ale K.
  • 316
  • 6
  • 18