BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kibicrealu1
Fluorite | Level 6

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?

1 ACCEPTED SOLUTION
6 REPLIES 6
JBailey
Barite | Level 11

Hi @kibicrealu1

 

There are ODBC to JDBC bridges. DataDirect provides one called SequeLink. You can find out about it here: https://www.progress.com/connectors/sequelink

 

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,
Jeff

kibicrealu1
Fluorite | Level 6

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

 

Cheers!

kibicrealu1
Fluorite | Level 6

 

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

 

Thanks

 

srinivask
Calcite | Level 5

Hi 

We are trying to connect SAS to AWS Athena by using ODBC/JDBC driver.

RHEL 6.7 , java version "1.7.0_79"

 

erarlier you faced an issue on this configuration .. is it resolved ?

please share the steps you followed.

Thanks

JBailey
Barite | Level 11

Hi @srinivask

 

This is a solved issue. It may be best to open up a new message containing the specifics of the issue you are having.

 

Feel free to mention my name in the new message because I would like to help with it.

 

Best wishes,

Jeff

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 5567 views
  • 2 likes
  • 4 in conversation