| Issue 337: | HP Vertica: non of INTERVAL values are supported | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
Connect to Vertica db and query for example: "SELECT INTERVAL '1 DAY'"
What is the expected output? What do you see instead?
I dont know, I think one of ['DateFromTicks', 'TimeFromTicks', 'TimestampFromTicks'] types. And I get exception:
pyodbc.Error: ('ODBC data type 1xx not supported. Cannot read column XXXX', 'HY000')
What version of the product are you using? On what operating system?
OS: Ubuntu 12.10
Python: Python 2.7.3
pyodbc: 3.x
>>> import pyodbc
>>> pyodbc.version
'3.0.6'
>>> con = pyodbc.connect(dsn='Vertica')
>>> con.execute("SELECT INTERVAL '1 DAY'")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pyodbc.Error: ('ODBC data type 110 is not supported. Cannot read column ?column?.', 'HY000')
Jan 21, 2014
#1
matthewc...@gmail.com
Mar 24, 2014
I see the same issue
Aug 26, 2014
I have this same issue with NetezzaSQL database. Data type 110 is not supported.
Aug 26, 2014
I think that INTERVAl data type is not on road map so far. As workaround - covert interval to int(seconds).
Dec 14, 2014
Use vertica-pyodbc. much better connector.
Apr 13, 2015
@benny >> much better connector. 1) do you mean vertica-python <https://github.com/uber/vertica-python>? :) 2) much slower (much more). 3) based on PostgreSQL wire protocol and what if Vertica will change a protocol? ;) 4) unofficial. For academic project connector is good enough, but not for enterprise. Use it on your own risk. 4) protocol supports for (3, 0) only and doesn't supports for (3, 5) file main: __init__.py # The protocol version (3.0.0) implemented in this library. PROTOCOL_VERSION = 3 << 16 PS Also implementation done without learning a PG Wire Protocol it self, but: This package is a Python port of the excellent Vertica Ruby gem ;) |