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

Alternative Approach for Counter In Cassandra

Is there any other way to implement counters in Cassandra ? I have a following table structure CREATE TABLE userlog ( term text, ts timestamp, year int, month int, day int, hour int, weekofyear int, dayofyear int, count counter, PRIMARY KEY (term,…
Ritesh Sinha
  • 820
  • 5
  • 22
  • 50
0
votes
1 answer

Is there an alternative to use Cassandra without PHP-driver?

I know about the Cassandra PHP driver being in BETA. But I strongly believe DataStax offers the best solutions as far as PHP drivers go for Cassandra. What I would love to try is to see if it's possible to get cassandra data into my PHP application…
Armand
  • 215
  • 1
  • 6
0
votes
1 answer

EOF Batch error

Impossible to run a batch alter table in cqlsh. cqlsh:test> create table mytable (id int PRIMARY KEY, comment text); cqlsh:test> begin batch alter table mytable add testcol text; apply batch; SyntaxException:
0
votes
1 answer

datastax 4.7 The 'start' parameter is not allowed in c# driver with autopaging off

I am using datastax 4.7, cassandra c# driver 2.5 I need to perform paging query. In the cqlsh, when I run paging off; then: select * from tbl where solr_query='{"q":"*:*","start":0,"sort":"id asc"}' ; The query has executed successfully. But when…
0
votes
1 answer

Do we need to run manual compaction with Leveled compaction strategy and SIzeTiered compaction strategy

We have a couple of tables with Leveled compaction strategy and SizeTiered compaction strategy. How often do we need to run compaction? Thanks in advance
kris433
  • 414
  • 5
  • 17
0
votes
1 answer

How to insert dynamic values to select query (for a date range )in Cassandra using node js

var result = 'select message from people.users where event_time > ? and event_time < ? allow filtering'; client.execute(result,[startdate,enddate], function(err,result) This is not working its showing : GET /favicon.ico 500 17.785 ms - 386 {…
Syed Ammar Mustafa
  • 373
  • 1
  • 7
  • 18
0
votes
1 answer

Cassandra | CQL | show unconfigured columnfamily error with SELECT QUERY

I am attempting to create my first table and query it with CQL 3 under Cassandra 1.2.15. My question is that why it show unconfigured columnfamily error for my existing table. Some answers for the question is to add double quotes around the table…
Willy
  • 1,828
  • 16
  • 41
0
votes
1 answer

Error in cqlsh command line while querying

I have a three node Cassandra cluster running perfectly fine. When i do select count(*) from usertracking; query on one of the node of my cluster. I get the following error : errors={}, last_host=localhost Statement trace did not complete…
Naresh
  • 5,073
  • 12
  • 67
  • 124
0
votes
1 answer

Presto Cassandra Connector Clustering Index

CQL Execution [returns instantly, assuming uses clustering key index]: cqlsh:stats> select count(*) from events where month='2015-04' and day = '2015-04-02'; count ------- 5447 Presto Execution [takes around 8secs]: presto:default> select…
Tamil
  • 5,260
  • 9
  • 40
  • 61
0
votes
1 answer

How to search for a table with an undefined column

In Cassandra, you can add and use a new column to a table like this: cqlsh:mysite> CREATE TABLE mytable ( url timeuuid, PRIMARY KEY (url) ); cqlsh:mysite> ALTER TABLE mytable ADD tag_tagX text; cqlsh:mysite> INSERT INTO mytable ( url ) VALUES…
Alain
  • 1,450
  • 3
  • 20
  • 37
0
votes
1 answer

CQLSH: How to print text on execution of >source 'CommandFile';

I am using these functionalities: Linux>cqlsh cqlsh>use mydatabase; cqlsh:mydatabase>source 'myCommands.cqlsh'; ... cqlsh:mydatabase> Since I am executing a file, I wish to comment some outputs, I would like to find a way to print a sort of echo…
Alain
  • 1,450
  • 3
  • 20
  • 37
0
votes
1 answer

Cassandra : The maximum size of an item in a collection is 64K

Is there is an alternate if collection data is more than 64K. According to cassandra doc Observe the following limitations of collections: The maximum size of an item in a collection is 64K. Keep collections small to prevent delays during…
rahul
  • 1,062
  • 5
  • 15
  • 31
0
votes
1 answer

Cassandra source statement vs copy

We need to load several gigabytes of csv files into cassandra. We tried ingesting data using source command to pull data from text files that contain insert statements with data values of the csv files. With this approach, the data is not getting…
tagsense
  • 81
  • 2
  • 8
0
votes
1 answer

Create table using cqlsh does not return to prompt

I am trying to create a table using cqlsh with composite primary key but it doesn't return to the cqlsh prompt. The cqlsh and cassandra versions are cqlsh 3.1.7 | Cassandra 1.2.13.2. Can we not create composite primary key using cqlsh? Have tried…
schatter
  • 151
  • 1
  • 11
0
votes
1 answer

How to define secondary key while table creation?

I was trying to create a secondary index in cassandra using cql3. I know I can do it using CREATE INDEX.. syntax. But is there any way I can designate a column as Secondary key when using CREATE TABLE.. syntax i.e., while defining a table? I have…
pinkpanther
  • 4,770
  • 2
  • 38
  • 62