Hello,
I have a django webapp that is currently using postgresql for its backend. I have some data in another database (Redshift) that I would like to create models from. When I run ‘python manage.py inspectdb --database redshift’ I get the below response for all the tables I have in Redshift.
from django.db import models
Unable to inspect table ‘my_table’
The error was: list index out of range
I’ve checked my Redshift user permissions and I have access to all the Tables. Has anyone else run into a similar issue? I appreciate any feedback or guidance.
Thank!
I’m using…
Django 4.1.2
django-redshift-backend 3.0.0
settings.py
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.postgresql’,
‘NAME’: os.environ.get(‘NAME’),
‘USER’: os.environ.get(‘USER’),
‘PASSWORD’: os.environ.get(‘PASSWORD’),
‘HOST’: os.environ.get(‘HOST’),
‘PORT’: os.environ.get(‘PORT’),
},
‘redshift’: {
‘ENGINE’: ‘django_redshift_backend’,
‘NAME’: os.environ.get(‘RDATABASE’),
‘USER’: os.environ.get(‘RUSER’),
‘PASSWORD’: os.environ.get(‘RPASSWORD’),
‘HOST’: os.environ.get(‘RHOST’),
‘PORT’: os.environ.get(‘RPORT’),
‘OPTIONS’: {
‘options’: ‘-c search_path=int’
}
}
}