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

When connecting caravel to hive server, throws this error when loading a table #720

Closed
shkr opened this issue Jul 7, 2016 · 4 comments
Closed

Comments

@shkr
Copy link
Contributor

shkr commented Jul 7, 2016

2016-07-06 19:39:09,153:ERROR:root:Compiler <sqlalchemy.sql.compiler.GenericTypeCompiler object at 0x10c75d150> can't render element of type <class 'impala.sqlalchemy.STRING'>
Traceback (most recent call last):
  File "/Users/shashank/.virtualenvs/caravel27/lib/python2.7/site-packages/caravel/models.py", line 771, in fetch_metadata
    datatype = "{}".format(col.type).upper()
  File "/Users/shashank/.virtualenvs/caravel27/lib/python2.7/site-packages/sqlalchemy/sql/type_api.py", line 481, in __str__
    return unicode(self.compile()).\
  File "/Users/shashank/.virtualenvs/caravel27/lib/python2.7/site-packages/sqlalchemy/sql/type_api.py", line 468, in compile
    return dialect.type_compiler.process(self)
  File "/Users/shashank/.virtualenvs/caravel27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.py", line 261, in process
    return type_._compiler_dispatch(self, **kw)
  File "/Users/shashank/.virtualenvs/caravel27/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 79, in _compiler_dispatch
    raise exc.UnsupportedCompilationError(visitor, cls)

Similar issue has been reported here (cloudera/impyla#71), and the exact issue has been posted here (cloudera/impyla#202) however I do not know how to pass bind=engine in case of using sqlalchemy via caravel

@shkr shkr changed the title Add impyla and connecting caravel to hive server, throws this error when loading a table When connecting caravel to hive server, throws this error when loading a table Jul 7, 2016
@shkr
Copy link
Contributor Author

shkr commented Jul 7, 2016

@wesm
Copy link
Member

wesm commented Jul 7, 2016

It's possible there has been some API change in SQLAlchemy, someone will need to look at https://github.com/cloudera/impyla/blob/master/impala/sqlalchemy.py to see why the error is occurring.

@shkr
Copy link
Contributor Author

shkr commented Jul 14, 2016

The issue was with the package pyhive. I fixed it dropbox/PyHive@896fa95

@shkr shkr closed this as completed Jul 14, 2016
@qinzl1
Copy link

qinzl1 commented Mar 9, 2017

impala have the same problem:
:ERROR:root:Unrecognized data type in qding_report.platform_user_behavior.dt
2017-03-09 17:16:08,564:ERROR:root:Compiler <sqlalchemy.sql.compiler.GenericTypeCompiler object at 0x7f83fecafe10> can't render element of type <class 'impala.sqlalchemy.STRING'>

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

3 participants