The most common pitfall when configuring ODBC for SAS Viya is attempting to troubleshoot connection errors directly within the SAS interface before validating the underlying OS-level setup. Always test your Impala connection using the UnixODBC isql command-line utility first; if isql succeeds, you can confidently isolate any remaining issues to your CAS environment variables, saving you hours of frustrating debugging
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
Los códigos y ejemplos proporcionados en WeAreCAS.eu son con fines educativos. Es imperativo no copiarlos y pegarlos ciegamente en sus entornos de producción. El mejor enfoque es comprender la lógica antes de aplicarla. Recomendamos encarecidamente probar estos scripts en un entorno de prueba (Sandbox/Dev). WeAreCAS no acepta ninguna responsabilidad por cualquier impacto o pérdida de datos en sus sistemas.
SAS y todos los demás nombres de productos o servicios de SAS Institute Inc. son marcas registradas o marcas comerciales de SAS Institute Inc. en los EE. UU. y otros países. ® indica registro en los EE. UU. WeAreCAS es un sitio comunitario independiente y no está afiliado a SAS Institute Inc.
Este sitio utiliza cookies técnicas y analíticas para mejorar su experiencia.
Saber más.