The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
(ns metabase-enterprise.transforms.util-test
(:require
[clojure.test :refer [deftest testing is]]
[metabase.driver.util :as driver.u]
[metabase.test :as mt]
[metabase.transforms.util :as transforms.u]))
(set! *warn-on-reflection* true)
(deftest is-temp-transform-tables-ee-test
(testing "tables with schema"
(let [table-with-schema {:name (name (driver.u/temp-table-name :postgres :schema/orders))}
table-without-schema {:name (name (driver.u/temp-table-name :postgres :orders))}]
(mt/with-premium-features #{}
(is (false? (transforms.u/is-temp-transform-table? table-with-schema)))
(is (false? (transforms.u/is-temp-transform-table? table-without-schema))))
(mt/with-premium-features #{:hosting :transforms-basic}
(is (transforms.u/is-temp-transform-table? table-without-schema))
(is (transforms.u/is-temp-transform-table? table-with-schema)))))
(testing "Ignores non-transform tables"
(mt/with-premium-features #{:transforms-basic}
(is (false? (transforms.u/is-temp-transform-table? {:name "orders"})))
(is (false? (transforms.u/is-temp-transform-table? {:name "public/orders"}))))))