3

I'm trying to build an application with superset, I've installed superset, Hive on my Hadoop cluster and I'm trying to connect to my Hive data base with super set but every time, I try to do so I receive this error:

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nCan't load plugin: sqlalchemy.dialects:jdbc.hive"}

Once I click on the "Test Connection" button.

Please does any one have a solution for this? Here's a screen shot of the problem

TylerH
  • 20,799
  • 66
  • 75
  • 101
fadhloun anis
  • 525
  • 1
  • 6
  • 13
  • When looking for more info I came across: https://github.com/apache/incubator-superset/issues/2632 Did you try this? – mtndoe Jul 18 '17 at 05:14
  • Thank you for your answer, yes I've already found that link and I have tried the proposed solution, but I still have the same issue. – fadhloun anis Jul 18 '17 at 07:41
  • 1
    I got this working by using the following connection string: `hive://:`. Essentially you can omit the jdbc bit and get it working. – Joseph Aug 01 '17 at 15:40
  • Are you install pyhive? – Mahdi Aug 02 '17 at 10:04
  • @Joseph When I do this I got this error: _Cannot open shared object file: no such file or directory_ I've tried every thing but nothing works ! – fadhloun anis Aug 02 '17 at 17:35
  • @Mahdi yes I have the latest version of pyhive installed – fadhloun anis Aug 02 '17 at 17:35
  • @fadhlounanis I'm guessing you have not installed some shared library. Most likely a *-dev* package thats listed in the superset installation instructions. – Joseph Aug 05 '17 at 00:09
  • @Joseph no that can not be the issue, I'm sure I've Installed all the packages listed in the superset installation instructions, also I have installed Druid on my hadoop Cluster wich contains an installed version of superset and I had exactly the same problem ! – fadhloun anis Aug 07 '17 at 08:49
  • I also tried to connect superset with hive and installed pyhive successfully, it can show tables once I clicked "Test Connection" but raised timeout error when query anyone of hive tables. The query issued is "2018-01-17 16:53:26,746:INFO:pyhive.hive:SELECT SUM(`zhima_avro`.`id`) AS `sum__id` FROM `default`.`zhima_avro` LIMIT 50000". The hive thrift server error is "FAILED: ParseException line 1:9 cannot recognize input near 'SELECT' 'SUM' '(' in describe statement". Anyone can tell me how to config it workable? – Casel Chen Jan 17 '18 at 08:56
  • @Joseph, thanks man, its working – ROOT Dec 06 '18 at 04:40

1 Answers1

6

For me in HDP with ambari:

cd /usr/hdp/3.1.4.0-315/superset/bin/
./pip3.6 install sasl
./pip3.6 install thrift_sasl
./pip3.6 install pyhive

Test:

./python3.6
>>from sqlalchemy.engine import create_engine
>>engine = create_engine('hive://localhost:10000/default')

without errors. Restart superset and work

Cristian Q
  • 617
  • 5
  • 9