How to Setup Amazon Athena ODBC Driver on Mac (unixODBC)

Install ODBC Driver

Download the ODBC Driver from the Connecting to Amazon Athena with ODBC and install it.

Setup

Once installation is done, open configuration file (simba.athenaodbc.ini) available at /Library/simba/athenaodbc/lib/.

and append ODBCInstLib=/usr/local/lib/libodbcinst.dylib to the configuration file.

[Driver]
## - Note that this default DriverManagerEncoding of UTF-32 is for iODBC.
ErrorMessagesPath=/Library/simba/athenaodbc/ErrorMessages
Driver=/Library/simba/athenaodbc/lib/libathenaodbc_sb64.dylib
ODBCInstLib=/usr/local/lib/libodbcinst.dylib
LogLevel=0
LogPath=
SwapFilePath=/tmp

Check ODBC Driver registration in unixODBC

Please follow the steps to check if the ODBC driver is properly registered to unixODBC.

  1. Open Terminal App and run odbcinst -j

Below is an example.

odbcinst -j

unixODBC 2.3.9
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /Users/hidetakakojima/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
  1. Open the file for the DRIVERS (e.g. /usr/local/etc/odbcinst.ini) with Text Editor

Check if you can see below entry for Athena ODBC Driver.

[Simba Athena ODBC Driver]
Driver=/Library/simba/athenaodbc/lib/libathenaodbc_sb64.dylib

If you don't see this entry, please add the entry to the file then save it.

This will make Athena ODBC driver work with unixODBC.