Questions tagged [cassandra-python-driver]

Python client library for Apache Cassandra

access from python. Provides ORM for cassandra.

This drivers provides:

46 questions
0
votes
0 answers

Cassandra Data Read Speed Slows Down

I have a problem that I can't understand. I have 3 node (RF:3) in my cluster and my nodes hardware is pretty good. Now there are 60 - 70 million rows and 3000 columns data in my cluster so i want to query specific data approximately 265000 rows and…
user14524584
0
votes
1 answer

ConnectionRefusedError No connection could be made because the target machine actively refused it cassandra

I was trying to reconnect with the a local instance, but getting this error, what can be the possible workaround? ('Unable to connect to any servers', {'127.0.0.1:8000': ConnectionRefusedError(10061, "Tried connecting to [('127.0.0.1', 6000)]. Last…
Dixcy
  • 1
  • 1
0
votes
1 answer

Python Cassandra driver: connect to Docker container on server - cassandra.UnresolvableContactPoints: {}

I am runnning cassandra in a docker container on a custom server. I start cassandra docker like this: docker run --name cassandra -p 9042:9042 -d cassandra:latest When i want to conect to the server via the python cassandra driver from datastax…
0
votes
1 answer

Cannot use BatchQuery in a paged result handler class

Python driver provides with a event/callback approach for large results: https://datastax.github.io/python-driver/query_paging.html Also, there is a BatchQuery class to use with ORM and it's quite…
BangTheBank
  • 809
  • 3
  • 11
  • 26
0
votes
0 answers

Write Timeout error in Cassandra using python cassandra driver

I have a single node cluster and when I perform the following query, I get the following error, DELETE FROM issuetable WHERE "partitionId"='1'; ** Error: ** : WriteTimeout: Error from server: code=1100 [Coordinator node timed out waiting for…
Harry
  • 3,072
  • 6
  • 43
  • 100
0
votes
1 answer

Python Cassandra: An authentication challenge was not sent, this is suspicious because the driver expects authentication

I'm trying to connect cassandraDB using python. I have used authentication as PlainTextAuthProvider. This is my code snippet. auth_provider = PlainTextAuthProvider(username="foo", password="bar") cluster = Cluster([1.1.1.1], protocol_version=2,…
Savad KP
  • 1,625
  • 3
  • 28
  • 40
0
votes
1 answer

Cassandra ring status using CQL python driver

I am trying to get the health of the cassandra cluster, is there way to get that using the python CQL driver? I was using pycassa earlier for the thrift based data model : https://github.com/datastax/python-driver Is there a way to get cluster…
0
votes
1 answer

How to get last inserted id in Python Cassandra?

i am using python cassandra driver, i have searched that how to get last inserted id but couldn't find any solution except this, but i want to get uuid or id not timestamp can any body help me please ?
Sahibzada
  • 143
  • 1
  • 11
0
votes
1 answer

Cassandra multiple connections save, not working [Python]

I have 2 cassandra clusters, my simple script is trying to read from one and write to another. As per the documentation here, I have a registered_connection (named) to the 2nd cluster and a default connection to the 1st cluster. I am able to query…
Segmented
  • 2,024
  • 2
  • 23
  • 44
0
votes
1 answer

How to use date time as a cluster in where clause in Cassandra using python driver?

I am using python driver and Cassandra, I have created the following schema CREATE TABLE channelFollowers( channelID BIGINT, isfavorite BOOLEAN, userID BIGINT, …
fahad
  • 35
  • 5
0
votes
1 answer

Write data to cassandra using python parser

I have a user defined python library which parses the data from a file and returns key value pairs. Now how do I use this library to insert data into Cassandra column family? I’m using python Cassandra driver.
0
votes
1 answer

CQL no viable alternative at input '12345' (CREATE TABLE IF NOT EXISTS [12345]...)">

I am creating a cassandra table if the table does not exist with Python code below: cluster = cassandra_cluster.Cluster([settings.CASSANDRA_CONTACT_POINT], settings.CASSANDRA_PORT) session =…
Mervyn Lee
  • 1,957
  • 4
  • 28
  • 54
0
votes
1 answer

How to do port translation when using an address translation map with cassandra?

I'm trying to connect to a scylladb cluster on compose using the Address Translation Map. I can only get the code working if I hard code the port when instantiating the Cluster instance: from cassandra.cluster import Cluster from cassandra.policies…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
0
votes
1 answer

Cassandra issue with delete between filter() and save()

I have an issue where a delete between loading an item and saving it back to cassandra causes columns which were not updated to be deleted. class TestItem(Model): uuid = columns.Integer(primary_key=True) data_1 = columns.Text() data_2 =…
user3688217
  • 538
  • 2
  • 5
  • 15
0
votes
1 answer

How to set serverside timestamp when create new record using python driver for cassandra

I have cassandra model as below. from uuid import uuid4 from uuid import uuid1 from cassandra.cqlengine import columns, connection from cassandra.cqlengine.models import Model from cassandra.cqlengine.management import sync_table class…
Nilesh
  • 20,521
  • 16
  • 92
  • 148