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

Cassandra ORM - AttributeError: 'NoneType' object has no attribute 'replace'

I've a following ColumnFamily class UniqueUserDealAction(models.Model): deal_id = columns.Text(primary_key=True) action = columns.Text(primary_key=True) imei1 = columns.Text(primary_key=True) imei2 = columns.Text(primary_key=True) …
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
0
votes
0 answers

Cassandra's Python CQLEngine model inheritance

I have the following object model: class Data(Model): __keyspace__ = 'varilog' __table_name__ = 'md_data' id = columns.TimeUUID(partition_key=True, primary_key=True, required=True) device = columns.Text(primary_key=True, required=True) …
Cedric H.
  • 7,980
  • 10
  • 55
  • 82
0
votes
1 answer

Query records which are greater than today's date using cqlengine

I want to query a record which are having today's date. The cql code am trying is given below cron = Cron.objects.filter(user_id = 5) cron= cron.filter(created_at__gte = datetime.combine(datetime.now().date(), datetime.min.time())) …
user4130072
  • 137
  • 4
  • 17
0
votes
1 answer

Unable to create more than two table using sync_table() in cqlengine

I have the following class in python and am using cqlengine as object mapper for cassandra DB, class Company(Model): id = columns.Integer(index=True, primary_key=True) company_name = columns.Text(required=False) created_at =…
user4130072
  • 137
  • 4
  • 17
0
votes
1 answer

CQLEngineException when running inside VPN

I keep getting this error when using django-cassandra-engine on a EC2 instance inside a VPN. CQLEngineException: It is required to setup() cqlengine before executing queries. It seems to run properly when running on a EC2 instance outside the…
TheGeorgeous
  • 3,927
  • 2
  • 20
  • 33
0
votes
1 answer

Create and change to new keyspace with Cassandra cqlengine?

Let's say we connect to some Cassandra cluster: cqlengine.connection.setup('hostname', 'some_keyspace') The method requires that we know at least one existing keyspace. What if we don't? What if we simply wish to check if a keyspace exists and…
AturSams
  • 7,568
  • 18
  • 64
  • 98
0
votes
1 answer

How to tell if CQLEngine made an insert or update through the Model class Save

I am using Python3.4 and CQLEngine. In my code, I am saving an object in an overloaded save operator as follows: Class Foo(Model, ...): id = columns.Integer(primary_key)=True bar = column.Text() ... def save(self): …
Ryan Kuhl
  • 90
  • 7
0
votes
2 answers

How do I represent a cassandra user defined type in a python model in cqlengine

I have the following table schema defined in my cassandra cluster CREATE TABLE users ( username text PRIMARY KEY, creationdate bigint, email text, firstlogin boolean, firstname text, lastloggedin bigint, lastname text, lastprofileupdate bigint, name…
Jome
  • 1,285
  • 2
  • 11
  • 20
0
votes
2 answers

Setup Cassandra DB in django using cqlengine but without using django-cassandra-engine

I'm a Django beginner and have developed 1 app using mysql as primary DB, but in my next project I have to use Cassandra db using https://github.com/cqlengine/cqlengine but do not use https://github.com/r4fek/django-cassandra-engine (which is a…
xyz
  • 197
  • 3
  • 16
0
votes
1 answer

cqlengine: way to create nested map

In what ways we can create a nested map in cqlengine models, For e.g class Test(Model): id = columns.UUID(primary_key=True, default=uuid.uuid4) address = columns.Map(key_type, value_type) I want "value_type"(in address column) to be a…
Neo
  • 5,070
  • 10
  • 46
  • 65
0
votes
1 answer

Data model design doubts on cqlengine(Cassandra CQL 3 Object Mapper for Python)

I am using cqlengine, I had few doubts: If we have a model defined as class Contact(Model): street = columns.Text() city = columns.Text() Can we do something like this Reference to contact model like mentioned in code below class…
Neo
  • 5,070
  • 10
  • 46
  • 65
0
votes
1 answer

Bad Request: Unknown identifier id

when I'm trying to run my program and insert a record in Cassandra database from Django framework, an error says that: Bad Request: Unknown identifier id What should I do? This is the error: CQLEngineException at /registered/ Bad Request: Unknown…
ehsan shirzadi
  • 4,709
  • 16
  • 69
  • 112
1 2 3 4
5