I'm trying to connect to Vertica as a regular ODBC DSN, which I can do
fine outside of sqlalchemy:

$ isql -v pod
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>

In [4]: pyodbc.connect('DSN=pod', ansi=True)
Out[4]: <pyodbc.Connection at 0x18f0440>

In [6]: con.execute('select 1')
Out[6]: <pyodbc.Cursor at 0x18e8c90>

How do I get sqlalchemy to connect?  It speaks a Postgresql-like
dialect (since it's a fork of PG); I have installed vertica-sqlalchemy
which provides this dialect.  However, I'm confused because there's no
way to just specify a DSN to sqlalchemy (not even getting to the
dialect-using stage of connection).  Whatever strings I try, I get:

DBAPIError: (Error) ('IM002', '[IM002] [unixODBC][Driver Manager]Data
source name not found, and no default driver specified (0)
(SQLDriverConnect)') None None

The /etc/odbc.ini is pretty simple:

[ODBC Data Sources]
pod = "the pod database"

[pod]
Driver = /opt/vertica/lib64/libverticaodbc.so
Servername = localhost
Database = pod
Port = 15433
UserName = dbadmin
Password = ...

I've been wrestling with this for a good part of the day.  Any hints
would be greatly appreciated.  Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to