To establish this connection, the CAS server controller (UNIX/Linux environment) must have a valid ODBC configuration using the ImpalaODBC driver coupled with the UnixODBC manager.
Step 1: Downloading the Components
Two main components are required:
UnixODBC Driver Manager: Open-source software available on its official website. Check the Cloudera ODBC driver installation guide to verify the compatible version.
Cloudera ImpalaODBC Driver: To be downloaded from the Cloudera website.
Note: If your environment already has an ODBC manager, you can use it and simply add the Impala configuration to the existing files.
Step 2: Installing the UnixODBC Manager
On the CAS server controller, log in as the root user to extract and compile the software. In this example, the installation is done in the /opt directory.
Terminal (Bash)
user@sas:~$$ gunzip unixODBC-2.3.4.tar.gz
user@sas:~$$ tar -xvf unixODBC-2.3.4.tar
Next, configure and compile UnixODBC:
Terminal (Bash)
user@sas:~$$ cd /opt/unixODBC-2.3.4
user@sas:~$$ ./configure --prefix=/opt/unixODBC-2.3.4 --disable-gui --disable-drivers
user@sas:~$$ make
Install the RPM driver via a YUM command. By default, the installation is done in /opt/cloudera/impalaodbc.
Terminal (Bash)
user@sas:~$$ cd /opt
user@sas:~$$ yum --nogpgcheck localinstall ClouderaImpalaODBC-2.5.35.1006-1.el7.x86
Step 4: Configuring the Link between Impala and UnixODBC
Once both components are installed, it is necessary to reconfigure the UnixODBC driver to include ImpalaODBC in its search path.
Terminal (Bash)
user@sas:~$$ cd /opt/unixODBC-2.3.4
user@sas:~$$ export LD_LIBRARY_PATH=/opt/unixODBC-2.3.4/lib
user@sas:~$$ ./configure --prefix=/opt/cloudera/impalaodbc --with-unixodbc=/opt/unixODBC-2.3.4
user@sas:~$$ make
user@sas:~$$ make install
Step 5: Updating the odbc.ini and odbcinst.ini files
The Cloudera driver provides sample .ini files located in /opt/cloudera/impalaodbc/Setup/. You can modify these files directly or copy them to another location.
The critical element is updating the odbc.ini file with your Hadoop cluster information (Hostname and Port of the Impala daemon).
Example configuration for a cluster where the daemon runs on the standard port 21050:
/opt/cloudera/impalaodbc/Setup/RO
# Values for HOST, PORT, KrbFQDN, and KrbServiceName
HOST=sascdh01.race.sas.com
PORT=21050
Database=default
# Values for HOST, PORT, KrbFQDN, and KrbServiceName
The codes and examples provided on WeAreCAS.eu are for educational purposes. It is imperative not to blindly copy-paste them into your production environments. The best approach is to understand the logic before applying it. We strongly recommend testing these scripts in a test environment (Sandbox/Dev). WeAreCAS accepts no responsibility for any impact or data loss on your systems.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.