Configuring Django for Netezza database (nzSQL)

645 views Asked by At

I'm fully new to Django (though not pyodbc), and I'm a little confused by how the database settings work. I would like to go the models route and configure settings.py to connect to Netezza database that has the following odbc configuration:

DRIVER={NetezzaSQL}
SERVER=netezza
DATABASE= database_name
UID=myID
PWD=mypassword

And here is what the odbc instance looks like:

$odbcinst -j
unixODBC 2.2.14
DRIVERS....... /etc/odbcinst.ini
STSREM DATA SOURCES..../etc/ODBCDataSources
USER DATA SOURCES.../u/me/.odbc.ini
SQLULEN Size......8
SQLLEN Size.....8
SQLSETPOSIROW Size..8

I can't for the life of me figure out how to get this into the settings.py file. Can someone explain how this works?

P.S. A similar question was asked here: unixodbc and netezza ODBC driver issue (Undefined symbol: SSL_connect) but none of the answers helped.

1

There are 1 answers

0
Thomas On BEST ANSWER

You'll need to install this library that provides a django database backend for netezza. Follow the instructions in the readme to get it set up.

https://github.com/msabramo/django-netezza