A proof-of-concept for connecting Django ORM to HP Vertica database.
- Django ORM SELECT works for some examples
- Django schema dumping works
- Can't run tests on Vertica DB as Vertica doesn't support database creation
- install
vertica_python
anddjango_vertica_backend
- edit
settings.py
DATABASES = { 'default': { 'ENGINE': 'vertica', 'NAME': 'dash', 'HOST': 'localhost', 'PORT': 5433, 'USER': 'dbadmin', 'PASSWORD': 'password' } }
from django.db.models import Sum
from test_app.models import PlatformReport
qs = PlatformReport.objects.filter(date__gte='2014-09-15')
qs = qs.values('platform_id')
qs = qs.annotate(video_views = Sum('video_views'))
print qs[100:500]