AWS Athena via Full Client SQL App

Rich Strang
2 min readFeb 24, 2021

--

If you’re anything like me, it took all of five minutes to tire of the AWS Athena client via the console. For the odd query here and there it’s fine, but anything more and it gets tedious.

Getting tired just thinking about writing queries

So what’s the answer I hear you ask?

Well for me, at the risk of sounding old fashioned, it was a good old full client SQL app. In this instance SQL Workbench/j (although as the BBC would say ‘…other brands are available’) .

Next you’ll want to create yourself a programmatic IAMS user in the AWS console.

Once you have the full client app up and running you’ll need to go download the Athena JDBC Driver.

Setting it up in SQL Workbench is pretty straight forward:

  • In SQL Workbench, select File> Manage Drivers.
  • Click Create a new entry
  • Provide a meaningful name.
  • Provide path to the JDBC driver you just downloaded.
  • Classname - com.simba.athena.jdbc.Driver
  • Sample URL — jdbc:awsathena://AwsRegion=[Region];

From here it’s a relative doddle:

  • File > Connect Window
  • Select driver configured above
  • Enter IAMs user credentials
  • Set S3OutputLocationproperty in Extended Properties as query S3 location

And there you go, life just got a little easier. Hope this helped.

--

--

No responses yet