Questions tagged [cqlengine]

Cassandra CQL Object Mapper for Python

cqlengine is a Cassandra CQL 3 Object Mapper for Python. cqlengine is part of the Datastax python driver for Cassandra

Related links:

72 questions
0
votes
1 answer

read time out in cassandra in django cassandra engine

Hi i'm using cassandra in python. i have a table in cassandra with line_id (uuid) as it's primary key. I have about 2000000 records(each partition has one record). when i want to get the count of records: NumberPartitionedLine.objects.count() i get…
Milad Khodabandehloo
  • 1,907
  • 1
  • 14
  • 24
0
votes
1 answer

Python cqlengine blobasinet alternative

SELECT blobasinet(columnname) from table ; system.blobasinet(columnname) ------------------------------------------- 192.168.97.12 192.168.96.9 This query will return the IP string for Blob Field what is the cqlengine version for this query?
Thomas John
  • 2,138
  • 2
  • 22
  • 38
0
votes
1 answer

How to define frozen columns in Cassandra using cqlengine?

I'm trying to create a frozen list in Cassandra so that I can use that column as a primary key, I can do that if I run the query manually, some_field frozen > but I'm having a hard time figuring out how to do it using cqlengine in…
Gonçalo Cabrita
  • 353
  • 1
  • 5
  • 11
0
votes
1 answer

Cassandra Celery python timeout happens on raw query execution using django db connection execute

My celery is configured for the Cassandra session like this: def cassandra_init(*args, **kwargs): """ Initialize a clean Cassandra connection. """ if cql_cluster is not None: cql_cluster.shutdown() if cql_session is not None: …
Thomas John
  • 2,138
  • 2
  • 22
  • 38
0
votes
1 answer

CqlEngine model primary_key not raising Unique Error

I am using CassandraDB in a flask project I have created a User Model which has email as the primary_key. class User(Model): __table_name__ = 'user' user_id = UUID(primary_key=True) email = Text(max_length=120, primary_key=True) …
Crazyshezy
  • 1,530
  • 6
  • 27
  • 45
0
votes
1 answer

Order by not work in cassandra

I'm a newbie in cassandra and I have an issue with "sort". My table is very simple, It like that: CREATE TABLE test.user_daily_report ( stringdate bigint, m_date date, users int, PRIMARY KEY (stringdate, m_date) ) WITH CLUSTERING…
Jame H
  • 1,324
  • 4
  • 15
  • 26
0
votes
1 answer

How to query in cqlengine to get aggregated values from cassandra tables

In Cassandra to get the aggregated data like sum,avg,min,max we use a query like,: SELECT avg(race_points) FROM cycling.cyclist_points WHERE id=e3b19ec4-774a-4d1c-9e5a-decec1e30aac; But, in cqlengine how is this be done.? I have columns with name…
0
votes
2 answers

Did Update Resulted in UPDATE OR INSERT

Cassandra supports upsert for UPDATE. That is, if the key provided in the update statement doesn't exist in the table; it is implied as insert. Is there a way to know from the return code of the update query if update resulted in update or insert.…
Sunil
  • 139
  • 1
  • 2
  • 8
0
votes
1 answer

Can i do 'DESCRIBE KEYSPACES' from cqlengine?

I'm using cqlengine from Django. Is there a way to make DESCRIBE KEYSPACES from it. It works form cqlsh. Couldn't find anything in Docs
Mike
  • 465
  • 5
  • 14
0
votes
1 answer

Cannot fetch data from cassandra using cqlengine python model :

I am trying to use the cassandrapython cqlengine for accessing the cassandra db, I was able to filter when the columns are not of list type. I get the following error message : d =cClass().filter(lastname='text',age=2,input__contains='a')…
0
votes
1 answer

Not able to convert cassandra blob/bytes string to integer

I have a column-family/table in cassandra-3.0.6 which has a column named "value" which is defined as a blob data type. CQLSH query select * from table limit 2; returns me: id | name | value id_001 | john | 0x010000000000000000 id_002 | terry |…
0
votes
1 answer

Ordering with no clustering key condition provided, when there are multiple clustering keys?

What would be query result of the below query. select * from Comment where photo_id = "xxx"; Will my order be comment_id ordered from most recent time? OR Will my order be score ordered in Desc highest to lowest score? class Comment(Model): …
Srikan
  • 2,161
  • 5
  • 21
  • 36
0
votes
0 answers

CQL: How does cassandra discriminator_column works

I'm asking about cassandra model-inheritance. Does anyone know how it works in CQL? Does it cassandra feature or python-driver implementation? What is the best way to store multiple similar models in one row?
ubombi
  • 1,115
  • 2
  • 15
  • 30
0
votes
1 answer

How to find sum of counter field using cqlengine?

I have a post table with fields post_id and total(counter field), which stores the viewers count for the post for a day. How can I get total viewers count for a post using cqlengine orm? a Flask application with cassandra as backend I'm up to this…
Sivaji P R
  • 111
  • 1
  • 8
0
votes
1 answer

cqlengine Model __table_name__ is None

I am trying the new cqlengine models as part of the datastax driver. , here I am not able get the table_name from the class from cassandra.cqlengine.models import Model class User(Model): uid =…
Srikan
  • 2,161
  • 5
  • 21
  • 36