Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Long varchar' not supported by VerticaDialect.get_columns #10

Open
vhermecz opened this issue Sep 1, 2014 · 0 comments
Open

'Long varchar' not supported by VerticaDialect.get_columns #10

vhermecz opened this issue Sep 1, 2014 · 0 comments

Comments

@vhermecz
Copy link

vhermecz commented Sep 1, 2014

Calling Table(table, meta, autoload=True, autoload_with=engine) fails on Vertica tables with Long varchar fields, as ischema_names misses entry for 'LONG VARCHAR'.

...
    Table(table, meta, autoload=True, autoload_with=engine)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 352, in __new__
    table._init(name, metadata, *args, **kw)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 425, in _init
    self._autoload(metadata, autoload_with, include_columns)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 437, in _autoload
    self, include_columns, exclude_columns
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1663, in run_callable
    return conn.run_callable(callable_, *args, **kwargs)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1190, in run_callable
    return callable_(self, *args, **kwargs)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 355, in reflecttable
    return insp.reflecttable(table, include_columns, exclude_columns)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 463, in reflecttable
    for col_d in self.get_columns(table_name, schema, **table.dialect_kwargs):
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 277, in get_columns
    **kw)
  File "<string>", line 2, in get_columns
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 53, in cache
    ret = fn(self, con, *args, **kw)
  File "/home/isc/envs/datasources/local/lib/python2.7/site-packages/sqlalchemy_vertica/base.py", line 153, in get_columns
    coltype = self.ischema_names[dtype]
KeyError: u'LONG VARCHAR'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant