question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jdbc+hive in sqlalchemy URI is not working

See original GitHub issue

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven’t found one similar

Superset version

0.18.4

Expected results

using jdbc+hive:// in sqlalchemy URI will work

Actual results

superset web server raise an exception:

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:jdbc.hive

Steps to reproduce

  • pip install -U pyhive
  • create a new database in superset using jdbc+hive:// prefix, and then press the test button.

More

I’ve read https://github.com/airbnb/superset/issues/241 to learn that it’s a known issue, and @shkr had posted a databricks tutorial that will guide new comers to setup this jdbc+hive connector, but the link within https://github.com/airbnb/superset/issues/241#issuecomment-234010902 is already gone, and I haven’t been able to found any related information on https://docs.databricks.com/user-guide/getting-started.html

that’s why I’m re-raising this issue, focusing on how to get jdbc+hive:// to work, and hopefully help make the docs more complete and friendly.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
JazzChencommented, Sep 21, 2017

SQLAlchemy URI: hive://localhost:10000

I solved this problem by follow reference. Hoping can help 😃

https://pypi.python.org/pypi/PyHive

from sqlalchemy import *
from sqlalchemy.engine import create_engine
from sqlalchemy.schema import *

engine = create_engine('hive://localhost:10000/default')
logs = Table('my_awesome_data', MetaData(bind=engine), autoload=True)
print select([func.count('*')], from_obj=logs).scalar()

Requirements

Install using

pip install pyhive[hive] for the Hive interface and pip install pyhive[presto] for the Presto interface.

pyhive==0.5.0 maybe also raise some error

pip install pythrifthiveapi

comment out getProgressUpdate in site-packages/pyhive/hive.py

2reactions
savamirkoviccommented, Dec 5, 2017

@JazzChen , I followed the solution you provided, still have the same issue with Can’t load plugin: sqlalchemy.dialects:hive.jdbc

I am using superset version 0.20.5

Read more comments on GitHub >

github_iconTop Results From Across the Web

jdbc+hive in sqlalchemy URI is not working #2950 - GitHub
I want to connect Apache Ignite database in superset, but I do not known how to type 'SQLAlchemy URI'.
Read more >
jdbc+hive in sqlalchemy URI is not working - - Bountysource
jdbc+hive in sqlalchemy URI is not working · [x] I have checked the superset logs for python stacktraces and included it here as...
Read more >
Can't load plugin: sqlalchemy.dialects:jdbc.hive - Stack Overflow
I got this working by using the following connection string: hive://<hive_server>:<port> . Essentially you can omit the jdbc bit and get it ...
Read more >
Engine Configuration — SQLAlchemy 2.0 Documentation
In SQLAlchemy 2.0, this parameter does nothing. In order to disable “implicit returning” for statements invoked by the ORM, configure this on a...
Read more >
Can't load plugin: sqlalchemy.dialects:jdbc.hive
... opened a new issue #4846: Can't load plugin: sqlalchemy.dialects:jdbc.hive URL: https://github.com/apache/incubator-superset/issues/4846 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found