SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Connect from SAS to AWS Athena (JDBC)

New Contributor
Posts: 3

Connect from SAS to AWS Athena (JDBC)

[ Edited ]

I am trying to establish a connection between SAS & AWS Athena. I am working on RHEL 6.7, java version is 1.8.0_71.

I have SAS/ACCESS to ODBC installed.


Could someone advise how to configure that please?


So far, after some reading on "Accessing Amazon Athena with JDBC" , I have tried a 'maybe it will work' naive approach with trying to set a DSN in odbc.ini files (outside of SAS): I have downloaded Athena JDBC jar file and tried configuring connection in a similar way I did it for EMR.

As expected, it didn't work and iODBC throws the following:

iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0709.0909

Enter ODBC connect string (? shows list): DSN=ATHENA
1: SQLDriverConnect = [iODBC][Driver Manager]/opt/amazon/hiveodbc/lib/64/AthenaJDBC41-1.1.0.jar: invalid ELF header (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003

As someone commented on SO, I should try using some ODBC-JDBC bridge but not sure how to approach this topic - all I have found so far covers accessing ODBC source, but that is not the case here (there is only jdbc driver for Athena).


Has anyone tried making such connection before? Is it even possible?

SAS Employee
Posts: 229

Re: Connect from SAS to AWS Athena (JDBC)

[ Edited ]
Posted in reply to kibicrealu1

Hi @kibicrealu1


There are ODBC to JDBC bridges. DataDirect provides one called SequeLink. You can find out about it here:


PROC GROOVY can do this... 
LilyAnne Zhang wrote an excellent SAS Global Forum paper on this topic.
Accessing DBMS with the Groovy Procedure and a JDBC Connection.


Hope this helps,

New Contributor
Posts: 3

Re: Connect from SAS to AWS Athena (JDBC)

Many thanks for a quick reply@JBailey, will read it through and let know of the progress.



New Contributor
Posts: 3

Re: Connect from SAS to AWS Athena (JDBC)

Posted in reply to kibicrealu1


I have installed ODBC-JDBC bridge from Easysoft, configured connection and tested using isql with -v -e options.

However, in SAS I am getting CLI prepare error:Untitled.png


Is there any way to cope with that in SAS?

Tried using dbidirectexec option (wanted to force SQLExecDirect instead of SQLPrepare & SQL Execute ) but no luck with that too.

I have opened a Support Track with SAS but no luck so far - hoping that someone may have experienced something similar in the past




Ask a Question
Discussion stats
  • 3 replies
  • 1 like
  • 2 in conversation