This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-05
Channels
- # beginners (12)
- # calva (18)
- # cider (1)
- # cljs-dev (29)
- # clojure (97)
- # clojure-uk (18)
- # clojurescript (10)
- # clojureverse-ops (2)
- # cursive (7)
- # emacs (10)
- # fulcro (42)
- # graphql (36)
- # joker (1)
- # juxt (28)
- # mount (2)
- # other-languages (2)
- # pathom (1)
- # portkey (3)
- # re-frame (50)
- # shadow-cljs (42)
- # spacemacs (4)
- # sql (6)
- # yada (6)
It looks like Presto is really fussy about what additional properties are passed into the driver. As the code stands in clojure.java.jdbc
, it won't work with Presto directly. I'm going to need to push an update to the get-connection
logic to support it.
I just updated next.jdbc
to 1.0.0-alpha13 with a fix for this -- if you'll willing to use that instead of clojure.java.jdbc
. Then the following db-spec will work
(def db-spec {:dbtype "presto" :dbname "test" :classname "com.facebook.presto.PrestoDriver" :user "me" :password "secret" :port 8080 :host "127.0.0.1"})
(! 925)-> clj -Sdeps '{:deps {seancorfield/next.jdbc {:mvn/version "1.0.0-alpha13"} com.facebook.presto/presto-jdbc {:mvn/version "0.219"}}}'
Downloading: seancorfield/next.jdbc/1.0.0-alpha13/next.jdbc-1.0.0-alpha13.pom from
Downloading: seancorfield/next.jdbc/1.0.0-alpha13/next.jdbc-1.0.0-alpha13.jar from
Clojure 1.10.0
user=> (require '[next.jdbc :as jdbc])
nil
user=> (def db-spec {:dbtype "presto" :dbname "test" :classname "com.facebook.presto.PrestoDriver" :user "me" :password "secret" :port 8080 :host "127.0.0.1"})
#'user/db-spec
user=> (def ds (jdbc/get-datasource db-spec))
#'user/ds
user=> (jdbc/get-connection ds)
Execution error (SQLException) at com.facebook.presto.jdbc.PrestoDriverUri/setupClient (PrestoDriverUri.java:152).
Authentication using username/password requires SSL to be enabled
user=>
(an expected error -- but it correctly loads the driver and validates the connection properties by that point)I'll backport this to clojure.java.jdbc
but it'll take a while to get released.
https://dev.clojure.org/jira/browse/JDBC-178 and it'll be in 0.7.10 whenever that gets released