Presto JDBC Interpreter with Notebook

409 views
Skip to first unread message

Goutam Torvi

unread,
Jan 24, 2017, 3:00:31 PM1/24/17
to Hue-Users
I tried adding Presto JDBC interpreter in the notebook section and I can use it in notebook snippet. However, I don’t see Presto JDBC popped up in the Sources assist panel. Is there something I missed? Presto supports both SHOW DATABASES and SHOW TABLES commands.

Also, Is there a way to restrict access to individual Snippets? If I have 2 databases, I need User1 to access DB1 and User2 to access DB2.

Thanks,
Goutam

Romain Rigaux

unread,
Jan 25, 2017, 9:35:34 PM1/25/17
to Goutam Torvi, Hue-Users

--
You received this message because you are subscribed to the Google Groups "Hue-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+unsubscribe@cloudera.org.

Goutam Torvi

unread,
Jan 25, 2017, 10:01:28 PM1/25/17
to Hue-Users, goutam...@gmail.com
Yes. I do have 2 entries of the same in the librdbms and Notebook section. Is that an issue? I see the tables and Databases listed under RDBMS but not in the Notebook.

Also, Is there a way to restrict access to individual Snippets? If I have 2 databases, I need User1 to access DB1 and User2 to access DB2.

Thanks,
Goutam
To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Goutam Torvi

unread,
Jan 25, 2017, 10:11:18 PM1/25/17
to Hue-Users, goutam...@gmail.com
These are the Entries

[notebook]
[[interpreters]]
[[[presto]]]
name=Presto JDBC
interface=jdbc
options='{"url": "jdbc:presto://localhost:8080/", "driver": "com.facebook.presto.jdbc.PrestoDriver"}'


[librdbms]
  [[databases]]
        [[[postgresql]]]
        nice_name=”Presto”
        name=default
        engine=postgresql
        host=localhost
        port=port
        user=pg

Goutam Torvi

unread,
Jan 30, 2017, 2:30:16 PM1/30/17
to Hue-Users, goutam...@gmail.com
HI Romain,

Here is the screen shot of the UI. I am able query the data. All works fine. But the Sources is not listed. 

Thanks.
HUEScreen.png

Romain Rigaux

unread,
Jan 31, 2017, 10:12:44 AM1/31/17
to Goutam Torvi, Hue-Users
Not having any source is not normal. Do you see any error in the logs or console?

Usually you can move up the root of the sources instead of listing Hive tables only http://gethue.com/custom-sql-query-editors/

To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+unsubscribe@cloudera.org.

Goutam Torvi

unread,
Jan 31, 2017, 1:22:19 PM1/31/17
to Hue-Users, goutam...@gmail.com
Hi Romain,

Here is the Error from error.log . I only want to have Notebook with Presto (JDBC) enabled. Here are the apps I have blacklisted. Am I doing anything wrong? app_blacklist=impala,security,filebrowser,pig,hbase,sqoop,zookeeper,metastore,spark,oozie,search,rdbms

QueryError

[30/Jan/2017 22:31:05 -0800] views        ERROR    Spark is not enabled

Traceback (most recent call last):

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/views.py", line 72, in notebook

    is_yarn_mode = LIVY_SERVER_SESSION_KIND.get()

AttributeError: 'Config' object has no attribute 'get'

[30/Jan/2017 22:31:07 -0800] decorators   ERROR    Error running <function autocomplete at 0x7f0154d65cf8>

Traceback (most recent call last):

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/decorators.py", line 81, in decorator

    return func(*args, **kwargs)

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/api.py", line 539, in autocomplete

    autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/connectors/jdbc.py", line 47, in decorator

    raise QueryError(message)

QueryError

[30/Jan/2017 22:31:19 -0800] decorators   ERROR    Error running <function autocomplete at 0x7f0154d65cf8>

Traceback (most recent call last):

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/decorators.py", line 81, in decorator

    return func(*args, **kwargs)

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/api.py", line 539, in autocomplete

    autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)

  File "/usr/local/hue/desktop/libs/notebook/src/notebook/connectors/base.py", line 105, in get_api

    raise PopupException(_('Snippet type %(type)s is not configured in hue.ini') % snippet)

PopupException: Snippet type hive is not configured in hue.ini



Thanks.
Goutam
To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Nimmi Cv

unread,
Jan 31, 2018, 6:33:46 PM1/31/18
to Hue-Users, goutam...@gmail.com
@goutam - were you able to resolve. I am facing the same issue.


On Tuesday, January 31, 2017 at 7:12:44 AM UTC-8, Romain Rigaux wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Sriram

unread,
Feb 22, 2018, 1:47:57 PM2/22/18
to Hue-Users, goutam...@gmail.com
I am having a similar issue with Hue 4.0.1. I get these errors when accessing Presto on Hue. Turned off autocomplete and it works. Looking for an alternate solution that may not include turning off autocomplete
Reply all
Reply to author
Forward
0 new messages