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
Die auf WeAreCAS.eu bereitgestellten Codes und Beispiele dienen Lehrzwecken. Es ist zwingend erforderlich, sie nicht blind in Ihre Produktionsumgebungen zu kopieren. Der beste Ansatz besteht darin, die Logik zu verstehen, bevor sie angewendet wird. Wir empfehlen dringend, diese Skripte in einer Testumgebung (Sandbox/Dev) zu testen. WeAreCAS übernimmt keine Verantwortung für mögliche Auswirkungen oder Datenverluste auf Ihren Systemen.
SAS und alle anderen Produkt- oder Dienstleistungsnamen von SAS Institute Inc. sind eingetragene Marken oder Marken von SAS Institute Inc. in den USA und anderen Ländern. ® zeigt die Registrierung in den USA an. WeAreCAS ist eine unabhängige Community-Site und nicht mit SAS Institute Inc. verbunden.
Diese Website verwendet technische und analytische Cookies, um Ihre Erfahrung zu verbessern.
Mehr erfahren.