Installing the ODBC Driver on Linux¶
A driver manager is required for managing the communication between Qubole and the ODBC driver.
Ensure that you uninstall the older version of the ODBC driver (if it exists) before installing a new version.
You can run
sudo yum remove qds-odbc.x86_64 to uninstall the ODBC driver.
Qubole ODBC driver is supported on the following Linux distributions:
- Red Hat Linux Enterprise 7.x
You can use iODBC or unixODBC as the driver manager as they are both supported by the ODBC driver.
iODBC as the Driver Manager¶
If iODBC is not installed on the centOS/RHEL, run the following command as a sudo user.
# yum install libiodbc
It provides the
iodbctest command utility to verify the connection.
unixODBC as the Driver Manager¶
unixODBC offers command line utilities (
odbcinst) to install, configure, and test the driver. To verify
if this package is installed along with distribution, run the following commands:
$ which odbcinst
$ which isql
If unixODBC is not installed, run the following command to install it.
$ sudo yum install unixODBC.x86_64
Verify the paths of ODBC configuration files (
odbcinst command as mentioned
$ odbcinst -j
$ yum install libiodbc
Installing the ODBC Driver¶
Qubole supports two variants of its ODBC drivers:
- Series 2.1.x (starting with version 2.1.1) is based on top of AWS SDK and hence it has inherent support for accessing AWS S3 buckets that require signature version V4.
- Series 2.2.x is based on older (1.X.X) releases and does not support accessing AWS S3 buckets that require signature version V4.
Perform these steps to install the ODBC driver on Linux on Series 2.2.x driver:
To install a different version, change the required version number in the steps.
This is an optional step if you want to verify the integrity of the downloaded package.
$ rpm --checksig qds-odbc-2.2.2-1.x86_64.rpm. The expected command output is:
qds-odbc-2.2.2-1.x86_64.rpm: sha1 md5 OK
Additionally, the package is signed by SHA-256. Download the key and signature from these locations:
Add the key and signature to verify the package as shown below:
$ openssl dgst -sha256 -verify pubkey.pem -signature qds-odbc-2.2.2-1.x86_64.sig qds-odbc-2.2.2-1.x86_64.rpm
The expected response is
Install Qubole driver package as a sudo user (super user) by running the command below.
$ sudo yum install qds-odbc-2.2.2-1.x86_64.rpm
After installing the driver. the LD_PRELOAD environment variable is set with the required library. Check the
LD_PRELOAD) by logging out of the current shell terminal and logging back through a new shell terminal. Here is a sample illustration of the command.
[[email protected] ~]$ echo $LD_PRELOAD :/lib64/libiodbcinst.so.2:::
Check the Qubole driver’s entry in
/etc/odbcinst.ini. This file has an entry for drivers installed on the system.
$ cat /etc/odbcinst.ini
The expected output is as below.
[ODBC Drivers] QuboleODBC=Installed [QuboleODBC] Description=Qubole ODBC Driver DSN Driver=/usr/local/qubole/libquboleodbc.so
After the package is installed, the driver gets added as a default system DSN entry into
Testing the Installation¶
You can verify the Linux driver installation by searching the Qubole driver entry in the
the command below to search the Linux driver.
$ cat /etc/odbcinst.ini
Uninstalling the ODBC Driver¶
Before installing a new version of ODBC driver, you should uninstall the existing version of ODBC driver. Run this command to uninstall the existing version of ODBC driver.
sudo yum remove qds-odbc.x86_64