File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 205205
206206; ; Overridden to have access to the database with the configured property dbnames (inclusion list)
207207; ; which will be used to filter the schemas.
208- (defmethod driver /describe-database :teradata
209- [driver database]
210- (jdbc/with-db-metadata [metadata driver database]
208+ (defmethod driver /describe-database :teradata [driver database]
209+ (jdbc/with-db-metadata [metadata (sql-jdbc.conn/db->pooled-connection-spec database)]
211210 {:tables (fast-active-tables, driver, ^DatabaseMetaData metadata, database)}))
212211
213212(defn- run-query
214213 " Run the query itself without setting the timezone connection parameter as this must not be changed on a Teradata connection.
215214 Setting connection attributes like timezone would make subsequent queries behave unexpectedly."
216215 [{sql :query , params :params , remark :remark } timezone connection]
217- (let [sql (s/replace (s/replace (str " -- " remark " \n " ( hx/unescape-dots sql) ) " OFFSET" " " ) " test_data" " test-data" ) ; ; temporary hack
216+ (let [sql (s/replace (s/replace (str " -- " remark " \n " sql) " OFFSET" " " ) " test_data" " test-data" ) ; ; temporary hack
218217 statement (into [sql] params)
219218 [columns & rows] (jdbc/query connection statement {:identifiers identity, :as-arrays? true
220219 :read-columns (#'metabase.driver.sql-jdbc.execute/read-columns :teradata timezone)})]
You can’t perform that action at this time.
0 commit comments