File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 11info :
22 name : Metabase Teradata Driver
33 # also replace the version in deps.edn if you change the metabase version here
4- version : 1.1.16 -metabase-v0.50.31-teradata-jdbc-20.00
4+ version : 1.1.17 -metabase-v0.50.31-teradata-jdbc-20.00
55 description : Allows Metabase to connect to Teradata databases. Community Supported driver.
66dependencies :
77 - class : com.teradata.jdbc.TeraDriver
Original file line number Diff line number Diff line change 116116 :remarks remarks}))
117117 (range 1 (inc (.getColumnCount metadata)))))))
118118 (catch java.sql.SQLException e
119- (if (= " 42S02" (.getSQLState e)) ; Check for SQLState 42S02 (object does not exist)
120- (do
121- (log/warn (trs " Table or view ''{0}'' in schema ''{1}'' does not exist." table-name schema))
122- []) ; Return an empty field set
123- (throw e))))) ; Re-throw other exceptions
119+ (let [sqlstate (.getSQLState e)]
120+ (cond
121+ ; ; 42S02: base object gone
122+ (= " 42S02" sqlstate)
123+ (do
124+ (log/warn (trs " Table or view ''{0}'' in schema ''{1}'' does not exist." table-name schema))
125+ [])
126+ ; ; 42S22: column(s) referenced by the view no longer exist
127+ (= " 42S22" sqlstate)
128+ (do
129+ (log/warn (trs " Skipping fields sync for ''{0}'' in schema ''{1}'' due to missing column(s). Cause: {2}"
130+ table-name schema (.getMessage e)))
131+ [])
132+ :else
133+ (throw e)))))) ; Re-throw other exceptions
124134
125135(defn ^:private fields-metadata
126136 [driver ^Connection conn {schema :schema , table-name :name } ^String db-name-or-nil]
You can’t perform that action at this time.
0 commit comments