1

I want to develop in Python from my local machine running Mac OS X and connect to a Vertica database in my network.

I downloaded the Vertica Mac Driver and set it up according to the instructions. When testing with iODBC, I get:

$ iodbctest
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008

Enter ODBC connect string (? shows list): ?

DSN                              | Driver                                  
------------------------------------------------------------------------------
VerticaDSN                       | Vertica                                 

Enter ODBC connect string (? shows list): VerticaDSN
1: SQLDriverConnect = [DSI] The error message InvalidConnStr could not be found in the       en-US locale. Check that /en-US/ODBCMessages.xml exists. (-1) SQLSTATE=HY000

When testing with unixODBC, I get a different error:

    $ isql -v VerticaDSN user pw 
[S1000][unixODBC][DSI] The error message NoSQLGetPrivateProfileString could not be found in the en-US locale. Check that /en-US/ODBCMessages.xml exists.
[ISQL]ERROR: Could not SQLConnect

The latter should be caused by a missing vertica.ini, but I did add the vertica.ini and exported its directory to the VERTICAINI environment variable. Here's how my vertica.ini looks like:

[Driver]
DriverManagerEncoding=UTF-32
ODBCInstLib=/usr/lib/libiodbc.2.dylib
ErrorMessagesPath=/Users/rmedri/Library/ODBC/vertica/lib64
LogLevel=4
LogPath=/Users/rmedri

and here's my odbc.ini (in ~/Library/ODBC/):

[ODBC Data Sources]
VerticaDSN = Vertica    
[VerticaDSN]
Driver = /Users/rmedri/Library/ODBC/vertica/lib64/libverticaodbc.dylib
Database = vbit
Servername = vertica-prod.<xxxx>.<xxxx>.com
UID = user
PWD = pw
Port = 5433

I've spent several hours on this and I am at a loss. Any guidance is appreciated, including alternative ways to connect to Vertica from Python running on Mac OS X.

Roberto
  • 2,800
  • 6
  • 29
  • 28
  • Did you see http://stackoverflow.com/questions/9778033/unixodbc-giving-error-while-running-isql-vertica ? – Fionnuala Feb 02 '13 at 12:15
  • I have and like I say in my question, I do have a vertica.ini file following the specifications given in Vertica's programmer guide. Still no success though. – Roberto Feb 02 '13 at 17:22

1 Answers1

1

I know it was a bit of trial and error for us, but we ended up needing:

DriverManagerEncoding=UTF-16

instead of UTF-32 in vertica.ini.

Guillaume
  • 61
  • 2