MapR 5.0 Documentation : ODBC Client Connections on Linux

You can use an ODBC client tool to connect to Impala from Linux. Install the driver and configure it to pass a SQL query to Impala. 

To install and configure the MapR Impala ODBC Driver, complete the following steps:

Once you complete the listed steps, Configure the MapR Impala ODBC Driver for Linux and Mac OS X.

Verify that your system meets the requirements before you begin.

Requirements

  • RedHat 6.x or CentOS 6.x
  • 50 MB of available disk space
  • An installed ODBC driver manager, such as unixODBC 2.3.0/2.3.1 or iODBC 3.52.7

 

Step 1: Download the MapR Impala ODBC Driver

You can install the 32- or 64-bit driver on Linux. Download and install the version of the driver that matches the architecture of the client application that you use to access Impala. The 64-bit editions of Linux support 32- and 64-bit applications.

Click on a link to download the driver appropriate for your system:

Step 2: Install the MapR Impala ODBC Driver 

Install the MapR Impala ODBC Driver on the machine that you connect to the Impala service from. 

MapR Impala ODBC Driver files install in the following locations:

  • /opt/mapr/impalaodbc/ErrorMessages – Error messages files directory
  • /opt/mapr/impalaodbc/Setup – Sample configuration files directory
  • /opt/mapr/impalaodbc/lib/32 – 32-bit shared libraries directory
  • /opt/mapr/impalaodbc/lib/64 – 64-bit shared libraries directory

To install the driver, complete the following steps:

  1. Login as root.
  2. Navigate to the folder that contains the driver RPM packages to install.
  3. Enter the following command where RPMFileName is the file name of the RPM package containing the version of the driver that you want to install: 

    RedHat and CentOS
    yum localinstall --nogpgcheck RPMFileName
    SUSE
    zypper install RPMFileName

The MapR Impala ODBC Driver depends on the following resources:

  • cyrus-sasl-2.1.22-7 or above
  • cyrus-sasl-gssapi-2.1.22-7 or above
  • cyrus-sasl-plain-2.1.22-7 or above

If the package manager in your Linux or Mac OS X distribution cannot resolve the dependencies automatically when installing the driver, download and manually install the packages.

Step 3: Update the Shared Library Environment Variable

Set the shared LD_LIBRARY_PATH environment variable. Update the shared library environment variable to include the paths to the following directories:

  • Installed ODBC driver manager libraries
  • Installed MapR Impala ODBC Driver for Impala shared libraries

    You can have both 32- and 64-bit versions of the driver installed at the same time on the same computer, but do not include the paths to both 32- and 64-bit shared libraries in LD_LIBRARY PATH at the same time. Only include the path to the shared libraries that correspond to the driver matching the architecture of the client application used. For example, if you are using a 64-bit client application and ODBC driver manager libraries are installed in /usr/local/lib, then set LD_LIBRARY_PATH as follows:

    export LD_LIBRARY_PATH=/usr/local/lib:/opt/mapr/impalaodbc/lib/64

Next Step

Configure the MapR Impala ODBC Driver for Linux and Mac OS X.