Fork me on GitHub
#sql
<
2023-03-20
>
Adrian Smith15:03:28

Has any one tried to use AWS Athena with JDBC Next? I'm having trouble getting a driver to be picked up

Adrian Smith15:03:05

Unhandled clojure.lang.ExceptionInfo
Execution error (SQLException) at java.sql.DriverManager/getConnection (DriverManager.java:706). No suitable driver found for jdbc:=...
That kind of thing

Adrian Smith15:03:46

I've tried these two separately in deps.edn:

awsathena/driver {:local/root "./AthenaJDBC42-2.0.35.1001.jar"}
liftoff/athena-jdbc-driver {:mvn/version "1.0.0"}

Adrian Smith15:03:48

Pointing to the jar directly (as defined above) gives this:

thom16:03:39

I think you need to mvn install it

thom16:03:49

Or perhaps be more knowledgeable about Maven than I am, but I remember going through this and all those variables only get filled in if you install it properly (e.g. mvn install:install-file -Dfile="./AthenaJDBC42.jar" -DgroupId=Athena -DartifactId=AthenaJDBC42 -Dversion=2.0.31.1000 -Dpackaging=jar -DgeneratePom=true in my case).

Adrian Smith17:03:23

Thank you, I'll install maven 🙂

Adrian Smith11:03:55

I understand that the jar gets installed into .m2, I haven't tried anything yet but do I just update local/root to the jar in .m2 or can I use it like a normal maven coord in deps.edn?

thom12:03:47

Once Maven knows about it, you can just use Athena/AthenaJDBC42 {:mvn/version "2.0.31.1000"} like a normal dependency in deps.edn.

🙂 2