-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Last Updated - 17 Aug 2021
django-timescaledb
django-timescaledb aims to achieve following objectives
- feature rich integration of TimescaleDB with Django
- high-quality module - proper testing and documentation
- keeping the module active with future releases of TimescaleDB and Django
- clearly communicate - version supports for Django and TimescaleDB - along with LTS, deprecation/upgrade notes
Improvements/Feature Requests
- time as primary_key #22 Why not allow making "partition key" as primary key? [M.1]
- Why does the partition key have to be named "time"? [M.1]
- data retention policy [M.2]
- Compression policies [M.2]
- FR: Aggregate View #12 Continuously aggregated views [M.2]
- additional partitioning key [M.2]
Milestone 1 [Basic usage]
- Create hypertable (for empty or non-empty tables) with single "time" based partition
- proper
model.Managerthat can be used to run queries - proper testing framework
- proper documentation
- all features in this step should work seamlessly with Django's
makemigrationsandmigratecommands, without user having to run single query himself - APIs
- DB backends (
postgresandpostgis) -TimescaleSchemaEditor -
models.Model-TimescaleModel(abstract) -
models.Manager-TimescaleManager(time_bucket,time_bucket_gapfill,histogram) -
models.Field-TimescaleDateTimeField -
models.Func-Interval,TimeBucket,TimeBucketGapFill -
models.Aggregate-Histogram,Last,First
- DB backends (
Milestone 2 [Advance features with manual management]
- have migrations operations for adding/removing/altering advanced features of TSDB, this has to be dropped in by the user in the migrations files manually
- support for "AggregateViews" - not sure how to implement it?
- additional partitioning key - not sure how to implement it?
- additional functions and/or queryset methods - "Drop chunks", "Percentile approximation", "Time-weighted average functions"
- new APIs
- data retention policy -
AddRetentionPolicy,AlterRetentionPolicy,RemoveRetentionPolicy - compression -
AlterTableCompression,AddCompressionPolicy,RemoveCompressionPolicy
- data retention policy -
Milestone 3 [Advance features with automatic management]
- Have a parallel "migration system" like Django's
Model.TSMetaclass - sinceModel.Metaclass in Django is restrictive (cannot add new attributes, etc), need to have a parallelTSMetaclass for storing "TSDB related meta" info (policies, etc) about theModelmakemigrations_tscommand - to generate "migrations" files with "TSDB" migration operationsmaketsmetacommand - that goes through all migrations and outputs allTSMetaclass based on "migration operations" added manually - tooling to migrate from M.2 -> M.3
schlunsen
Metadata
Metadata
Assignees
Labels
No labels