Comments (3)
specify a primary key field explicitly
from django-clickhouse-backend.
specify a primary key field explicitly
yes, specify primary key filed explicitly like FILE_ID = models.UInt32Field(primary_key=True), and set in class Meta as
class Meta:
engine = models.MergeTree(
primary_key="FILE_ID",
order_by=("FILE_ID",),
index_granularity=8192,
)
But still with default column id in the table.
from django-clickhouse-backend.
I mean choose a field and set primary_key=True
like:
class Event(models.ClickhouseModel):
ip = models.GenericIPAddressField(default="::", primary_key=True)
If the so called primary key field is not unique, then query method get
or save
or other methods depend on unique primary key is not expected to be called.
from django-clickhouse-backend.
Related Issues (20)
- [BUG] DB Error 386 when updating JSONField HOT 2
- [BUG ] UUID like id dont work afrter upate 1.0.1 -> 1.1.4 HOT 1
- Supporting Integration Engines HOT 1
- [Feature Request] Support for CityHash64
- [DOCS] The changelog does not list version 1.1.4 HOT 4
- [BUG] - Package taking time to render response. HOT 7
- Window func not working HOT 2
- Support for AggregateFunction under AMT HOT 3
- Unexpected 'driver' HOT 1
- [QUESTION] DB::Exception: Syntax error: failed at position 268 ('<'): <clickhouse_backend.models.fields.integer.UInt64Field> HOT 3
- [BUG] AttributeError: 'ReplicatedReplacingMergeTree' object has no attribute 'expressions' HOT 6
- Error. Code 102 HOT 3
- [Issue] HOT 1
- support for "prewhere" HOT 1
- [BUG] HOT 2
- Unable to install the library using pip HOT 3
- dbrouters.py from pypi.org error HOT 2
- [BUG] permanent warnings and reconnects from clickhouse-driver HOT 1
- I have a problem with additional settings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-clickhouse-backend.