In this tutorial, we will download & Install ODBC driver for the Amazon Redshift Database in Redhat Linux. We will make ODBC entry which will help us connect to the AWS Redshift.
Download and Install AWS Redshift ODBC Drivers
Download the latest Amazon Redshift Drivers for Linux from AWS website.
curl https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.27.1000/AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64.rpm
Driver Installation Steps
- Create directory to store driver binaries
mkdir /path/to/odbc-drivers/redshift/
- Copy driver rpm file in above directory
cp AmazonRedshiftODBC-64-bit-1.4.27.1000-1.x86_64.rpm /path/to/odbc-drivers/redshift/
- Install Driver with Root User
sudo su - root yum --nogpgcheck localinstall AmazonRedshiftODBC-64-bit-1.4.11.1000-1.x86_64.rpm
- Verify the Driver Path
After installation following directory shall get created with drive.
Directory : /opt/amazon/redshiftodbc/ Driver : /opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so
- Create ODBC Entry inside odbc.ini
[AWS_RedShift] Driver=/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so Description=Amazon Redshift ODBC driver Database=DBNAME Host=example.redshift.amazonaws.com Port=5439 UserName=DB_USER Password=DB_PASSWORD CharacterSet=UTF8 DateTimeFormat=AAA RETRYONEINTR=YES LoginTimeout=1000
Conclusion
We configured ODBC connection for the Redshift DB. You can use this ODBC entry from tools like PyODBC, Informatica etc to communicate with the Redshift Database.
Tagged Under : Informatica Linux ODBC Open Source