From c993779c86b8c5810385040d55a0c4e7fceabce7 Mon Sep 17 00:00:00 2001 From: Andrei Lougovtsov <alougovtsov@ocient.com> Date: Wed, 13 Nov 2024 23:56:54 +0000 Subject: [PATCH] Restore ability to see views --- project.clj | 2 +- resources/metabase-plugin.yaml | 2 +- src/metabase/driver/ocient.clj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index 5078d37..bbec0cd 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject metabase/ocient-driver "v1.2.1" +(defproject metabase/ocient-driver "v1.2.2" :min-lein-version "2.5.0" :repositories {"project" "file:repo"} diff --git a/resources/metabase-plugin.yaml b/resources/metabase-plugin.yaml index 199b634..42224b1 100644 --- a/resources/metabase-plugin.yaml +++ b/resources/metabase-plugin.yaml @@ -1,7 +1,7 @@ # Complete list of options here: https://github.com/metabase/metabase/wiki/Metabase-Plugin-Manifest-Reference info: name: Metabase Ocient Driver - version: v1.2.1 + version: v1.2.2 description: Allows Metabase to connect to Ocient databases. driver: diff --git a/src/metabase/driver/ocient.clj b/src/metabase/driver/ocient.clj index 2a056ef..336e02c 100644 --- a/src/metabase/driver/ocient.clj +++ b/src/metabase/driver/ocient.clj @@ -437,7 +437,7 @@ These are returned as a set of maps, the same format as `:tables` returned by `describe-database`." [database] (try (set (jdbc/query (sql-jdbc.conn/db->pooled-connection-spec database) - ["LIST VIEWS;"])) + ["SELECT schema AS \"schema\", name AS \"name\" FROM sys.views WHERE schema NOT IN ('sys', 'information_schema', 'syslookup', 'sysgdc');"])) (catch Throwable e (log/error e "Failed to fetch views for this database"))))