Apache Cassandra drivers for variety of programming languages
Questions tagged [cassandra-driver]
88 questions
2
votes
1 answer
When connecting cassandra hosted on docker container with nodejs getting NoHostAvailableError: No host could be resolved
I set up the Cassandra container by running the following commands:
This will pull the Cassandra docker image from the docker hub and start up a container with Cassandra
docker network create cassandra-net
docker run --name my-cassandra --network…

Goldi Pandey
- 61
- 4
2
votes
1 answer
Cassandra 3.x to 4.x driver differences
Can anyone tell me how to replication this old annotation from the Datastax 3.x series of drivers to the new 4.x series:
@Table(
name = "mytable",
readConsistency = "LOCAL_ONE",
writeConsistency = "LOCAL_QUORUM")
I got the…

Jason Nethercott
- 373
- 3
- 20
2
votes
1 answer
Unable to insert nested json into cassandra
I am new in Cassandra. I have created one sample table. Right now facing problem during insert.
created employee like below :
create table employee(
emp_id int PRIMARY KEY,
first_name text,
last_name text,
department text,
skillswithrank…

sameer vedpathak
- 31
- 7
2
votes
1 answer
Syntax error in CQL query when trying to write to cassandra from python
So, I am building an application in python that takes data from twitter and then saves it to cassandra. My current problems lies in a script which reads data from kafka and tries to write it to cassandra, as follows:
import threading, logging,…

JOSE MANUEL RAMIREZ LEON
- 163
- 2
- 13
2
votes
1 answer
Cassandra python driver - frozen with Object Mapper
I'm trying to declare and create (using sync_table) Cassandra table using a Object Mapper from python Cassandra driver (cassandra-driver package version 3.14), but I can't find a way to define a frozen value in a collection.
Is there a way to…

iborko
- 157
- 9
2
votes
1 answer
Python cassandra driver Readtimeout
Every time I try to get query using the cassandra python driver, I will receive such an exception:
**File "something.py", line 32, in
rows = session.execute('some query execution', timeout=None)
File…

Andy Chang
- 55
- 6
2
votes
2 answers
Querying cassandra database with an array
I am trying to query my cassandra database to return data from a list of names held on an array server side. This is held as an array.
I know the data I am accessing is stored as a string in my database and so I have appended single quotes around it…

Joseph Clough
- 33
- 1
- 6
2
votes
1 answer
Issue when closing cassandra cluster and session
Cassandra 2.1.15.1403 | DSE 4.8.9
Cassandra driver tested with: 2.1.2 and 3.1.7
We are using a python script to migrate some data in one of our tables. Once this is done we are closing off the connections using:
if (None != self.session):
…

Sid
- 1,224
- 3
- 23
- 48
2
votes
1 answer
Remove newline characters from Cassandra query results
I am using the python Cassandra driver to query a database.
This is the code that I ran:
from cassandra.cluster import Cluster
from cassandra.query import dict_factory
ips = [...]
cluster = Cluster(ips)
session =…

pajamas
- 1,194
- 1
- 12
- 25
2
votes
1 answer
Can anyone explain what a page state is on Cassandra?
I am trying to implement paginated REST API backed by Cassandra. I found that the Cassandra driver has a pagination feature (http://docs.datastax.com/en/developer/java-driver/3.3/manual/paging/). I did a simple experiment with this feature, and it…

Wei
- 191
- 3
- 13
1
vote
2 answers
Can't connect DataStax AstraDB with Django app on Google Cloud
I am trying to connect AstraDB with my application served by gcloud AppEngine. I am using Django and therefore have used django_cassandra_engine. I want to keep Postgres as my default DB and use cassandra as a second DB.
Everything works as expected…

Marat M
- 11
- 2
1
vote
0 answers
Cassandra long connection times (compared to Redis)
I'm surprised by Cassandra long connection times (compared to Redis) made from the python client (cassandra-driver) to a single-node Cassandra cluster running on the same host. How can they be improved?
More info
Even though Cassandra server runs…

mirekphd
- 4,799
- 3
- 38
- 59
1
vote
1 answer
How do I setup dropwizard metrics for the Cassandra java driver?
I would like to set up the java driver to collect JMX metrics using jConsole or jmxterm. How do I go about exposing those mbean metrics in the Cassandra java driver? In this case, I'm using the 4.14 java driver.

stevenlacerda
- 341
- 1
- 4
1
vote
0 answers
Why cassandra python query result replaces column name's space with underscore?
I am using cassandra python driver.
Version details :
[cassandra-driver (3.25.0)]
[cqlsh 6.8.0 | Cassandra 4.0.4 | CQL spec 3.4.5 | Native protocol v4]
I am querying Cassandra database where I have created few columns which have empty space and…

sandejai
- 931
- 1
- 15
- 22
1
vote
0 answers
Why keyspace metadata is null only when connecting to datastax enterprise 6.8 with cassandra-driver?
We have a requirement to support Datastax Enterprise 6.8.Installed DSE6.8 on aws ec2 linux by referring https://docs.datastax.com/en/install/6.8/install/dseBasicInstall.html.
Our code does support Apache cassandra,drivers we use are…

prathyusha magam
- 149
- 11