Skip to content

Commit

Permalink
Fix Postgres root cert error (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyiliev authored Sep 19, 2023
1 parent 41fed34 commit 1601ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/metabase-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ driver:
helper-text: Your Materialize cluster name.
- user
- password
- ssl
- name: schema-filters
type: schema-filters
display-name: Schemas
Expand Down
5 changes: 3 additions & 2 deletions src/metabase/driver/materialize.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@
[_ details]
(let [merged-details (merge default-materialize-connection-details details)]
(validate-connection-details merged-details)
(let [{:keys [host port db cluster], :as opts} merged-details]
(let [{:keys [host port db cluster ssl], :as opts} merged-details]
(sql-jdbc.common/handle-additional-options
(merge
{:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:subname (str "//" host ":" port "/" db "?options=--cluster%3D" cluster)
:sslmode (if ssl "require" "disable")
:OpenSourceSubProtocolOverride false}
(dissoc opts :host :port :db :cluster))))))
(dissoc opts :host :port :db :cluster :ssl))))))

(defmethod driver/describe-table :materialize
[driver database table]
Expand Down

0 comments on commit 1601ab5

Please sign in to comment.