BookmarkSubscribeRSS Feed
PRAVIN_JAIN
Calcite | Level 5

I am connecting to Athena through SAS, connection is working and I am able to fetch the data as well into SAS.

After manipulation in SAS, i need to upload result dataset into AWS where i am getting an error as below - 

 

Working libname connection :

libname athtst clear;
%let schema_core="test_db";

libname athtst jdbc schema=&schema_core
driverclass="com.simba.athena.jdbc.Driver"
url=<>;Schema=<>;Workgroup=<>;GlueEndpointOverride=<>;EndpointOverride=<>;AwsCredentialsProviderClass=<>;"
user=<> password="&pass."
classpath="/sas/Software/jdbcdrivers/xx_athena_looker.jar" schema=&schema_core.;

 

 

Code - 

proc sql;
create table athtst.test_out as
select * from test_in;
quit;

 

Error - 

ERROR: Error attempting to CREATE a DBMS table. ERROR: Execute error: [Simba][AthenaJDBC](100071) An error has been thrown from the
AWS Athena client. No location was specified for table. An S3 location must be specified [Execution ID not available].

 

I have tried multiple option providing S3 location in above create table statement however its not working. Looking for some guidance on this.

3 REPLIES 3
Amir
PROC Star

Hi,

 

There are an odd number of quotes (9) in the code:

libname athtst clear;
%let schema_core="test_db";

libname athtst jdbc schema=&schema_core
driverclass="com.simba.athena.jdbc.Driver"
url=<>;Schema=<>;Workgroup=<>;GlueEndpointOverride=<>;EndpointOverride=<>;AwsCredentialsProviderClass=<>;"
user=<> password="&pass."
classpath="/sas/Software/jdbcdrivers/xx_athena_looker.jar" schema=&schema_core.;

 

Does the log show any messages regarding this?

 

 

 

Thanks & kind regards,

Amir.

PRAVIN_JAIN
Calcite | Level 5

Thanks for response.

 

Given libname statement is just a sample, I have removed some info from actual statement hence it may have unbalanced quotes. Libname statement is running fine.

 

Below code works fine if I use source as athena table as source however I get error if I use SAS work table as source.

Success -

proc sql;
create table athtst.test_out as
select * from athtst.test_in;
quit;

 

Error - 

proc sql;
create table athtst.test_out as
select * from test_in;
quit;

 

My requirement is to upload SAS dataset into Athena.

Patrick
Opal | Level 21

What happens if you run below code?

options sastrace=',,,d' sastraceloc=saslog nostsuffix msglevel=i;
proc append base=athtst.test_out data=work.test_in nowarn force;
run;quit;

If this doesn't work please share the SAS log.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 860 views
  • 0 likes
  • 3 in conversation