Thursday, May 29, 2014

Re: Using AWS Redshift database Django 1.6

Yeah, I came across that as well, but it didn't work on 1.6.  I cloned and debugged it up until I got the exact same error as the paste in my first message. :(

So, a few questions:
  • Am I correct in my analysis that the syncdb command alone is generating the table creation sql that includes the constraint redshift is barfing on?
  • If I were to patch the syncdb command code, is it reasonable to consult the database backend for settings related to which constraints are allowed/not?
  • Does it make more sense for the database backend code to do the table creation instead of syncdb?  (As in, db backends provide might an abstracted create table method that syncdb could just call instead of building its own sql.)
I know more than I did a day ago, but I'm still not super hip on how db backends are implemented and how the rest of the framework interacts with them.  So if the stuff I'm asking doesn't make sense then do put me on the right path. :)

Thanks!
jpk



On Thu, May 29, 2014 at 12:01 PM, C. Kirby <misthop@gmail.com> wrote:
Wow, redshift lets you save quite a bit of data.
It looks like someone started in on a redshift backend, I found something on github (https://github.com/binarydud/django-redshift)
It appears to be unmaintained, and maybe not even complete, but you might get some idea's of where work needs to be done from it.

Kirby


On Thursday, May 29, 2014 9:13:55 AM UTC-5, jpk wrote:
Greetings,

I'm attempting to set up a django project using amazon redshift as the database backend.  I started a fresh 1.6.5 project and set up the database portion of settings.py to use the redshift cluster. With just the default apps (admin, auth, contenttypes, sessions, messages, and staticfiles), I ran syncdb and got this: https://dpaste.de/y98N.  Compared to vanilla postgre, redshift doesn't support some things, including some constraints, which is what's making syncdb blow up.

What worries me in that backtrace is, the table creation sql that has the offending constraint in it is being generated in commands/syncdb.py, so that's before we even get to the postgresql_psycopg2 backend code, right?  So hacking on the postgres backend to make it jive with redshift wouldn't help, here.  (Correct me if I'm wrong!)

Anyway, what wisdom can you share?  What's the best way to approach this?  Is trying to get this to work even a good idea?  Any guidance would be greatly appreciated.


Thanks!
jpk



--
john p. kiffmeyer

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8bd4e6b5-42c5-4779-86af-cb04b708540d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
john p. kiffmeyer

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEQ4iqUF5t5A1MXQzwfy81TJ-NkngLBkMdhhN7Ra2Ki5suWd-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment