Compare commits

...

2 Commits

Author SHA1 Message Date
Ngoc Khuat
6c72e676cf fix invalid ws id and invalid user key 2026-02-11 19:06:33 +07:00
Ngoc Khuat
1f60703527 bring back workspace features 2026-02-11 15:48:30 +07:00
2 changed files with 8 additions and 4 deletions

View File

@@ -11,9 +11,13 @@
(mt/run-mbql-query venues {:limit 1})
false
(catch Exception _e
true)))]
true)))
;; JDBC drivers authenticate via :user, BigQuery uses :impersonate-service-account
swap-details (if (isa? driver/hierarchy driver/*driver* :bigquery-cloud-sdk)
{:impersonate-service-account "unicorn"}
{:user "unicorn"})]
(testing "db is swapped if being executed inside a macros"
(driver/with-swapped-connection-details (mt/id) {:user "unicorn"}
(driver/with-swapped-connection-details (mt/id) swap-details
(is (db-swapped?))))
(testing "sanity check that it's not swapped outside of the macros"

View File

@@ -835,7 +835,7 @@
:transforms/python true
:transforms/table true
;; Workspace isolation using service account impersonation
:workspace false}]
:workspace true}]
(defmethod driver/database-supports? [:bigquery-cloud-sdk feature] [_driver _feature _db] supported?))
;; BigQuery is always in UTC
@@ -1443,7 +1443,7 @@
(let [table-id (TableId/of project-id schema name)]
(ws-grant-table-read-access! client table-id ws-sa-email)))))
(def ^:private perm-check-workspace-id "00000000-0000-0000-0000-000000000000")
(def ^:private perm-check-workspace-id "1337")
(defmethod driver/check-isolation-permissions :bigquery-cloud-sdk
[driver database test-table]