Configure Hue to Connect to Drill Using the Drill ODBC Driver

Describes how to connect Hue to Drill using the Drill ODBC Driver.

Starting in EEP 7.0.0 (Hue 4.6.0.0 and Drill 1.16.1.0), you can install the Drill ODBC driver and then use the driver to connect Hue to Drill. Note that the Drill ODBC Driver is not available for Ubuntu.

For Hue, the ODBC Driver provides better performance than the JDBC Driver. The ODBC Driver is invoked directly from the Python VM of the Hue process whereas Hue must launch a separate Java Gateway process with the JDBC Driver to translate the Python instructions to JVM instructions, which degrades performance.

Prerequisites

Before you connect Hue to Drill:

Configuring Hue to Connect to Drill

To configure Hue to connect to Drill through the Drill ODBC Driver, add the Drill ODBC interpreter entry in the notebook section of hue.ini using the sqlalchemy interface, as shown in the following example:
[notebook]
  # ...
  [[interpreters]]
    # ...
    [[[drillodbc]]]
      name=Drill ODBC
      interface=sqlalchemy
      ## Specify Drill ODBC connection parameters separated by "&".
      ## Ensure that Drill ODBC drivers and unixODBC installed.
      options='{"url": "drill+odbc:///?<ODBC connection parameters>"}'
The following example shows a Hue configuration with the ODBC DSN (Data Source Name) configured in ~/.odbc.ini. Note that the DelegationUID=${USER} property enables outbound impersonation from Hue to Drill.
[notebook]
  # ...
  [[interpreters]]
    # ...
    [[[drillodbc]]]
      name=Drill ODBC
      interface=sqlalchemy
      options='{"url": "drill+odbc:///?DSN=MapR Drill 64-bit&DelegationUID=${USER}"}'
The following example shows a Hue configuration that uses a Drillbit connection with default security (MapRSASL) enabled:
[notebook]
  # ...
  [[interpreters]]
    # ...
    [[[drillodbc]]]
      name=DrillODBC
      interface=sqlalchemy
      options='{"url": "drill+odbc:///?Driver=/opt/mapr/drill/lib/64/libdrillodbc_sb64.so&ConnectionType=Direct&HOST=node1.cluster.com&PORT=31010&AuthenticationType=MapRSASL&DelegationUID=${USER}"}'
NOTE If you do not use the DSN, you must manually specify the full path to the Drill ODBC Driver, for example:
Driver=/opt/mapr/drill/lib/64/libdrillodbc_sb64.so