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
Rename Data Studio library page heading to Semantic layer (#82224)
Maz Amelicdd2788f2a53
diff --git a/e2e/test/scenarios/data-studio/data-model/data-studio-bulk-table.cy.spec.ts b/e2e/test/scenarios/data-studio/data-model/data-studio-bulk-table.cy.spec.tsindex 6c530abd2c4..5275d09405d 100644--- a/e2e/test/scenarios/data-studio/data-model/data-studio-bulk-table.cy.spec.ts+++ b/e2e/test/scenarios/data-studio/data-model/data-studio-bulk-table.cy.spec.ts@@ -139,7 +139,7 @@ describe("bulk table operations", { viewportWidth: 1600 }, () => {cy.log("publish the tables and verify they are published");cy.findByRole("button", { name: /Publish/ }).click();- H.modal().findByText("Create my Library").click();+ H.modal().findByText("Create my semantic layer").click();H.modal().findByText("Publish these tables").click();cy.wait("@publishTables");H.undoToastListContainer().within(() => {diff --git a/e2e/test/scenarios/data-studio/data-model/data-studio-single-table.cy.spec.ts b/e2e/test/scenarios/data-studio/data-model/data-studio-single-table.cy.spec.tsindex b0ae7a203a0..cccc424718c 100644--- a/e2e/test/scenarios/data-studio/data-model/data-studio-single-table.cy.spec.ts+++ b/e2e/test/scenarios/data-studio/data-model/data-studio-single-table.cy.spec.ts@@ -76,7 +76,7 @@ describe("Table editing", () => {.findByTestId("table-published").should("not.exist");cy.findByRole("button", { name: /Publish/ }).click();- H.modal().findByText("Create my Library").click();+ H.modal().findByText("Create my semantic layer").click();H.modal().findByText("Publish this table").click();cy.wait("@publishTables");TablePicker.getTable("Orders")@@ -226,7 +226,7 @@ describe("Table editing", () => {cy.log("publish the table and verify the tree updates");cy.findByRole("button", { name: /Publish/ }).click();- H.modal().findByText("Create my Library").click();+ H.modal().findByText("Create my semantic layer").click();H.modal().findByText("Publish this table").click();cy.wait("@publishTables");TablePicker.getTable("Orders")diff --git a/e2e/test/scenarios/data-studio/data-studio-library.cy.spec.ts b/e2e/test/scenarios/data-studio/data-studio-library.cy.spec.tsindex 5a766efdb32..a39467dc323 100644--- a/e2e/test/scenarios/data-studio/data-studio-library.cy.spec.ts+++ b/e2e/test/scenarios/data-studio/data-studio-library.cy.spec.ts@@ -56,7 +56,7 @@ describe("scenarios > data studio > library", () => {cy.log("Create library via inline empty state");H.DataStudio.Library.libraryPage().within(() => {cy.findByText("A source of truth for analytics").should("be.visible");- cy.findByText("Create my Library").click();+ cy.findByText("Create my semantic layer").click();});cy.wait("@createLibrary");@@ -419,9 +419,9 @@ describe("scenarios > data studio > library", () => {H.modal().findByText("Data").should("be.visible");H.modal().button("Publish this table").click();- cy.log("Navigate back to Library via breadcrumbs");+ cy.log("Navigate back to Semantic layer via breadcrumbs");H.DataStudio.breadcrumbs()- .findByRole("link", { name: "Library" })+ .findByRole("link", { name: "Semantic layer" }).click();cy.log("Verify Data section shows the table (empty state hidden)");diff --git a/e2e/test/scenarios/data-studio/data-studio-tables.cy.spec.ts b/e2e/test/scenarios/data-studio/data-studio-tables.cy.spec.tsindex c2c757c9267..dc3670a7203 100644--- a/e2e/test/scenarios/data-studio/data-studio-tables.cy.spec.ts+++ b/e2e/test/scenarios/data-studio/data-studio-tables.cy.spec.ts@@ -58,7 +58,7 @@ describe("scenarios > data studio > library > tables", () => {it("should show page breadcrumbs", () => {H.DataStudio.breadcrumbs().within(() => {- cy.findByRole("link", { name: "Library" }).should("be.visible");+ cy.findByRole("link", { name: "Semantic layer" }).should("be.visible");cy.findByRole("link", { name: "Data" }).should("be.visible");cy.findByText("Orders").should("be.visible");});diff --git a/enterprise/backend/src/metabase_enterprise/data_studio/api/table.clj b/enterprise/backend/src/metabase_enterprise/data_studio/api/table.cljindex 8d7fcd0f77a..2d43eb1d039 100644--- a/enterprise/backend/src/metabase_enterprise/data_studio/api/table.clj+++ b/enterprise/backend/src/metabase_enterprise/data_studio/api/table.clj@@ -172,7 +172,7 @@(api/check-data-studio-access)(let [target-collection (api/check-404 (data-studio.db/collection (:collection_id body)))_ (api/check-400 (= (:type target-collection) collection/library-data-collection-type)- (tru "Tables can only be published to Library/Data collections."))+ (tru "Tables can only be published to Semantic layer/Data collections."))selectors (body->table-selectors body)upstream-ids (all-upstream-table-ids selectors);; Don't move already-published upstream tables; only publish unpublished ones. Get table IDs before updatediff --git a/enterprise/backend/src/metabase_enterprise/library/api.clj b/enterprise/backend/src/metabase_enterprise/library/api.cljindex a0869621aeb..eeada506fa2 100644--- a/enterprise/backend/src/metabase_enterprise/library/api.clj+++ b/enterprise/backend/src/metabase_enterprise/library/api.clj@@ -23,7 +23,7 @@_query_body](api/check-data-studio-access)- (api/check-400 (not (collections/library-collection)) "Library already exists")+ (api/check-400 (not (collections/library-collection)) "Semantic layer already exists")(collections/create-library-collection!))(defn- add-here-and-below [collection]diff --git a/enterprise/backend/src/metabase_enterprise/library/validation.clj b/enterprise/backend/src/metabase_enterprise/library/validation.cljindex 9a7004c5b32..9aaa9322fd0 100644--- a/enterprise/backend/src/metabase_enterprise/library/validation.clj+++ b/enterprise/backend/src/metabase_enterprise/library/validation.clj@@ -11,7 +11,7 @@{collection/library-collection-type{:allowed-content-types #{collection/library-data-collection-typecollection/library-metrics-collection-type}- :error-message "Cannot add anything to the Library collection"}+ :error-message "Cannot add anything to the semantic layer"}collection/library-data-collection-type{:allowed-content-types #{:table collection/library-data-collection-type}@@ -45,10 +45,10 @@(when (and (collection/library-root-collection? collection)(seq (set/intersection change-keys#{:name :description :archived :location :personal_owner_id :slug :namespace :type :authority_level :is_sample})))- (throw (ex-info "Cannot update properties on a Library collection" {})))+ (throw (ex-info "Cannot update properties on a semantic layer collection" {})))(when (and (collection/is-library-collection? (:id collection))(contains? change-keys :location)(when-let [parent-id (collection/location-path->parent-id (:location collection))](not= (:type collection) (library.db/collection-type parent-id))))- (throw (ex-info "Cannot move a Library collection outside the Library" {}))))+ (throw (ex-info "Cannot move a semantic layer collection outside the semantic layer" {}))))true)diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.cljindex 61a467a96b1..4b01920311f 100644--- a/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj+++ b/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj@@ -103,7 +103,7 @@{:table_ids [(mt/id :users)]}))(testing "returns 400 when target collection is not a library-data collection"(mt/with-temp [:model/Collection {collection-id :id} {}]- (is (= "Tables can only be published to Library/Data collections."+ (is (= "Tables can only be published to Semantic layer/Data collections."(mt/user-http-request :crowberto :post 400 "ee/data-studio/table/publish-tables"{:table_ids [(mt/id :users)]:collection_id collection-id})))))diff --git a/enterprise/backend/test/metabase_enterprise/library/api_test.clj b/enterprise/backend/test/metabase_enterprise/library/api_test.cljindex 56831ef88b7..d469837fed2 100644--- a/enterprise/backend/test/metabase_enterprise/library/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/library/api_test.clj@@ -17,8 +17,8 @@(is (= "Library" (:name response)))(is (some? (t2/select-one-pk :model/Collection :type collection/library-data-collection-type)))(is (some? (t2/select-one-pk :model/Collection :type collection/library-metrics-collection-type)))))- (testing "a second call rejects with 400 'Library already exists'"- (is (= "Library already exists"+ (testing "a second call rejects with 400 'Semantic layer already exists'"+ (is (= "Semantic layer already exists"(mt/user-http-request :crowberto :post 400 "ee/library"))))))))(deftest get-library-testdiff --git a/enterprise/backend/test/metabase_enterprise/library/validation_test.clj b/enterprise/backend/test/metabase_enterprise/library/validation_test.cljindex 9ee05b0f395..9ada652f908 100644--- a/enterprise/backend/test/metabase_enterprise/library/validation_test.clj+++ b/enterprise/backend/test/metabase_enterprise/library/validation_test.clj@@ -18,13 +18,13 @@(mt/with-premium-features #{:library}(mt/with-temp [:model/Collection no-allowed-content {:name "Test No Content" :type collection/library-collection-type}](testing "Cannot add anything to library collections"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the semantic layer"(t2/insert! :model/Collection (merge (mt/with-temp-defaults :model/Collection) {:location (str "/" (:id no-allowed-content) "/")}))))- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the semantic layer"(t2/insert! :model/Card (merge (mt/with-temp-defaults :model/Card) {:type :model, :collection_id (:id no-allowed-content)}))))- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the semantic layer"(t2/insert! :model/Card (merge (mt/with-temp-defaults :model/Card) {:type :metric :collection_id (:id no-allowed-content)}))))- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the semantic layer"(t2/insert! :model/Dashboard (merge (mt/with-temp-defaults :model/Dashboard) {:collection_id (:id no-allowed-content)}))))))))(deftest check-allowed-content-table@@ -95,7 +95,7 @@(doseq [col [library models metrics]](testing (str "Checking type " (:type col))(is (thrown-with-msg? clojure.lang.ExceptionInfo- #"Cannot update properties on a Library collection"+ #"Cannot update properties on a semantic layer collection"(t2/update! :model/Collection (:id col) {:name "New Name"})))))))))(deftest unpublish-tables-in-archived-collection-test@@ -200,17 +200,17 @@(contains? #{(:id library-root) (:id data-root) (:id metrics-root)}(:id coll)))](testing "Cannot move the Library collection itself into a vanilla collection"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot update properties on a Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot update properties on a semantic layer collection"(t2/update! :model/Collection (:id library-root) {:location vanilla-location}))))(testing "Cannot move a top-level Data collection into a vanilla collection"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot update properties on a Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot update properties on a semantic layer collection"(t2/update! :model/Collection (:id data-root) {:location vanilla-location}))))(testing "Cannot move a top-level Metrics collection into a vanilla collection"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot update properties on a Library collection"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot update properties on a semantic layer collection"(t2/update! :model/Collection (:id metrics-root) {:location vanilla-location})))))(testing "Cannot move a Data subcollection into a vanilla collection"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot move a Library collection outside the Library"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot move a semantic layer collection outside the semantic layer"(t2/update! :model/Collection (:id data-sub) {:location vanilla-location}))))(testing "Cannot move a Metrics subcollection into a vanilla collection"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot move a Library collection outside the Library"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot move a semantic layer collection outside the semantic layer"(t2/update! :model/Collection (:id metrics-sub) {:location vanilla-location}))))))))diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibraryPage/LibraryPage.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibraryPage/LibraryPage.tsxindex d0edff0e52c..b569dbccfe4 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibraryPage/LibraryPage.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibraryPage/LibraryPage.tsx@@ -119,7 +119,7 @@ function LibraryPageContent() {<SectionLayout><PaneHeaderbreadcrumbs={- <DataStudioBreadcrumbs>{t`Library`}</DataStudioBreadcrumbs>+ <DataStudioBreadcrumbs>{t`Semantic layer`}</DataStudioBreadcrumbs>}px="3.5rem"py={0}diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsxindex c9dc11c62d4..140570092b6 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx@@ -4,7 +4,7 @@ import { usePageTitle } from "metabase/hooks/use-page-title";import { Outlet } from "metabase/router";export function LibrarySectionLayout() {- usePageTitle(t`Library`);+ usePageTitle(t`Semantic layer`);return <Outlet />;}diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.tsxindex 4f6b4ddc9cb..87d97e710a5 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.tsx@@ -26,7 +26,7 @@ import { useCreateLibraryMutation } from "metabase-enterprise/api";import type { Collection } from "metabase-types/api";export function CreateLibraryModal({- title = t`Create your Library`,+ title = t`Create your semantic layer`,explanatorySentence,isOpened,onCreate,@@ -81,7 +81,7 @@ function ModalBody({ explanatorySentence, onCreate, onClose }: ModalBodyProps) {const handleSubmit = async () => {const collection = await createLibrary().unwrap();- sendSuccessToast(t`Library created`);+ sendSuccessToast(t`Semantic layer created`);trackDataStudioLibraryCreated(collection.id);onCreate?.(collection);};@@ -93,7 +93,7 @@ function ModalBody({ explanatorySentence, onCreate, onClose }: ModalBodyProps) {<Stack gap="sm">{explanatorySentence && <Text>{explanatorySentence}</Text>}<Text>- {t`The Library helps you create a source of truth for analytics by providing a centrally managed set of curated content. It separates authoritative, reusable components from ad-hoc analyses.`}+ {t`The semantic layer helps you create a source of truth for analytics by providing a centrally managed set of curated content. It separates authoritative, reusable components from ad-hoc analyses.`}</Text><List spacing="sm"><ListItem@@ -106,7 +106,7 @@ function ModalBody({ explanatorySentence, onCreate, onClose }: ModalBodyProps) {/><ListItemtitle={t`Version control`}- description={t`Sync your Library to Git`}+ description={t`Sync your semantic layer to git`}/><ListItemtitle={t`High trust`}@@ -123,7 +123,10 @@ function ModalBody({ explanatorySentence, onCreate, onClose }: ModalBodyProps) {color="neutral"onClick={onClose}>{t`Cancel`}</Button>- <FormSubmitButton label={t`Create my Library`} variant="filled" />+ <FormSubmitButton+ label={t`Create my semantic layer`}+ variant="filled"+ /></Group></Form></FormProvider>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.unit.spec.tsxindex 06066f0074f..adf018ec881 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/CreateLibraryModal/CreateLibraryModal.unit.spec.tsx@@ -32,13 +32,13 @@ function setup({ hasCreateError }: SetupOpts = {}) {describe("CreateLibraryModal", () => {it("should be able to create the library", async () => {const { onCreate } = setup();- await userEvent.click(screen.getByText("Create my Library"));+ await userEvent.click(screen.getByText("Create my semantic layer"));await waitFor(() => expect(onCreate).toHaveBeenCalled());});it("should show a library creation error", async () => {const { onCreate } = setup({ hasCreateError: true });- await userEvent.click(screen.getByText("Create my Library"));+ await userEvent.click(screen.getByText("Create my semantic layer"));expect(await screen.findByText("An error occurred")).toBeInTheDocument();expect(onCreate).not.toHaveBeenCalled();});diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.tsxindex 2edda96378c..574058f3c79 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.tsx@@ -27,7 +27,7 @@ export function LibraryEmptyState() {try {setError(null);const collection = await createLibrary().unwrap();- sendSuccessToast(t`Library created`);+ sendSuccessToast(t`Semantic layer created`);trackDataStudioLibraryCreated(collection.id);} catch (error) {setError(getErrorMessage(error));@@ -45,7 +45,7 @@ export function LibraryEmptyState() {<Stack gap="sm"><Title order={3}>{t`A source of truth for analytics`}</Title><Text c="text-secondary" lh="1.25rem">- {t`The Library helps you create a source of truth for analytics by providing a centrally managed set of curated content. It separates authoritative, reusable components from ad-hoc analyses.`}+ {t`The semantic layer helps you create a source of truth for analytics by providing a centrally managed set of curated content. It separates authoritative, reusable components from ad-hoc analyses.`}</Text></Stack><Stack gap="sm">@@ -54,7 +54,7 @@ export function LibraryEmptyState() {variant="filled"onClick={handleSubmit}loading={isLoading}- >{t`Create my Library`}</Button>+ >{t`Create my semantic layer`}</Button></Group>{error && <Text c="feedback-negative">{error}</Text>}</Stack>@@ -73,7 +73,7 @@ export function LibraryEmptyState() {<FeatureCardicon="git_branch"title={t`Version control`}- description={t`Sync your Library to Git`}+ description={t`Sync your semantic layer to git`}/><FeatureCardicon="verified_round"diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.unit.spec.tsxindex e867a09bb92..7b8a852cec0 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/LibraryEmptyState/LibraryEmptyState.unit.spec.tsx@@ -25,15 +25,17 @@ function setup({ hasCreateError }: SetupOpts = {}) {describe("LibraryEmptyState", () => {it("should be able to create the library", async () => {setup();- await userEvent.click(screen.getByText("Create my Library"));+ await userEvent.click(screen.getByText("Create my semantic layer"));await waitFor(() =>- expect(screen.queryByText("Create my Library")).not.toBeInTheDocument(),+ expect(+ screen.queryByText("Create my semantic layer"),+ ).not.toBeInTheDocument(),);});it("should show a library creation error", async () => {setup({ hasCreateError: true });- await userEvent.click(screen.getByText("Create my Library"));+ await userEvent.click(screen.getByText("Create my semantic layer"));expect(await screen.findByText("Something went wrong")).toBeInTheDocument();});});diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/PublishTablesModal/PublishTablesModal.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/PublishTablesModal/PublishTablesModal.tsxindex 88a5b0c8914..3522a29cfb9 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/PublishTablesModal/PublishTablesModal.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/PublishTablesModal/PublishTablesModal.tsx@@ -155,7 +155,7 @@ function ModalBody({><Form><Stack gap="sm">- <Text>{t`Publishing a table saves it to the Library.`}</Text>+ <Text>{t`Publishing a table saves it to the semantic layer.`}</Text>{unpublished_upstream_tables.length > 0 && (<><Text>{getForeignKeyMessage(selected_table)}</Text>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/UnpublishTablesModal/UnpublishTablesModal.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/UnpublishTablesModal/UnpublishTablesModal.tsxindex 2e95e80d99f..a01cff258d5 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/UnpublishTablesModal/UnpublishTablesModal.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/components/UnpublishTablesModal/UnpublishTablesModal.tsx@@ -172,8 +172,8 @@ function getInfoMessage(publishedRemappedTables: BulkTableInfo[],) {return selectedTable != null && publishedRemappedTables.length === 0- ? t`This will remove this table from the Library.`- : t`This will remove these tables from the Library.`;+ ? t`This will remove this table from the semantic layer.`+ : t`This will remove these tables from the semantic layer.`;}function getForeignKeyMessage(selectedTable: BulkTableInfo | null) {diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/components/DataStudioMetricBreadcrumbs/DataStudioMetricBreadcrumbs.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/components/DataStudioMetricBreadcrumbs/DataStudioMetricBreadcrumbs.tsxindex 65219cd05f7..acb96c6a848 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/components/DataStudioMetricBreadcrumbs/DataStudioMetricBreadcrumbs.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/components/DataStudioMetricBreadcrumbs/DataStudioMetricBreadcrumbs.tsx@@ -1,6 +1,7 @@import { Link } from "metabase/common/components/Link";import { DataStudioBreadcrumbs } from "metabase/common/data-studio/components/DataStudioBreadcrumbs/DataStudioBreadcrumbs";import { useCollectionPath } from "metabase/common/data-studio/hooks/use-collection-path/useCollectionPath";+import { getLibraryCollectionDisplayName } from "metabase/data-studio/common/utils";import * as Urls from "metabase/urls";import type { Card } from "metabase-types/api";@@ -24,7 +25,7 @@ export function DataStudioMetricBreadcrumbs({expandedIds: path.slice(1, index + 1).map((c) => c.id),})}>- {collection.name}+ {getLibraryCollectionDisplayName(collection)}</Link>))}<span>{card.name}</span>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/pages/NewMetricPage/NewMetricPage.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/pages/NewMetricPage/NewMetricPage.tsxindex e0d97f115e4..225fcf1e2eb 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/pages/NewMetricPage/NewMetricPage.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/metrics/pages/NewMetricPage/NewMetricPage.tsx@@ -15,7 +15,7 @@ export function DataStudioNewMetricPage() {triggeredFrom="data_studio"renderBreadcrumbs={() => (<DataStudioBreadcrumbs>- <Link to={Urls.dataStudioLibrary()}>{t`Library`}</Link>+ <Link to={Urls.dataStudioLibrary()}>{t`Semantic layer`}</Link>{t`New Metric`}</DataStudioBreadcrumbs>)}diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/components/SnippetHeader/SnippetHeader.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/components/SnippetHeader/SnippetHeader.tsxindex f7e20c74db3..6d2bcfc6fac 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/components/SnippetHeader/SnippetHeader.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/components/SnippetHeader/SnippetHeader.tsx@@ -64,6 +64,7 @@ export function SnippetHeader({{...rest}breadcrumbs={<DataStudioBreadcrumbs loading={isLoadingPath}>+ <Link to={Urls.dataStudioLibrary()}>{t`Semantic layer`}</Link><Link key="snippet-root-collection" to={Urls.dataStudioLibrary()}>{t`SQL snippets`}</Link>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/ArchivedSnippetsPage/ArchivedSnippetsPage.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/ArchivedSnippetsPage/ArchivedSnippetsPage.tsxindex 83971aaf2dc..6ac87cc0f2f 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/ArchivedSnippetsPage/ArchivedSnippetsPage.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/ArchivedSnippetsPage/ArchivedSnippetsPage.tsx@@ -75,6 +75,7 @@ export function ArchivedSnippetsPage() {<PaneHeaderbreadcrumbs={<DataStudioBreadcrumbs>+ <Link to={Urls.dataStudioLibrary()}>{t`Semantic layer`}</Link><Link to={Urls.dataStudioLibrary()}>{t`SQL snippets`}</Link>{t`Archived snippets`}</DataStudioBreadcrumbs>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/NewSnippetPage/NewSnippetPage.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/NewSnippetPage/NewSnippetPage.tsxindex 47c8c035f4f..37305d4f223 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/NewSnippetPage/NewSnippetPage.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/NewSnippetPage/NewSnippetPage.tsx@@ -122,6 +122,7 @@ export function NewSnippetPage() {}breadcrumbs={<DataStudioBreadcrumbs>+ <Link to={Urls.dataStudioLibrary()}>{t`Semantic layer`}</Link><Link to={Urls.dataStudioLibrary()}>{t`SQL snippets`}</Link>{t`New Snippet`}</DataStudioBreadcrumbs>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/tables/components/TableHeader/TableHeader.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/tables/components/TableHeader/TableHeader.tsxindex 4f85461ae82..fb5b83c7e78 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/tables/components/TableHeader/TableHeader.tsx+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/tables/components/TableHeader/TableHeader.tsx@@ -5,6 +5,7 @@ import {type PaneHeaderProps,} from "metabase/common/data-studio/components/PaneHeader";import { useCollectionPath } from "metabase/common/data-studio/hooks/use-collection-path/useCollectionPath";+import { getLibraryCollectionDisplayName } from "metabase/data-studio/common/utils";import * as Urls from "metabase/urls";import type { Table } from "metabase-types/api";@@ -37,7 +38,7 @@ export function TableHeader({ table, ...rest }: TableHeaderProps) {expandedIds: path.slice(1, i + 1).map((c) => c.id),})}>- {collection.name}+ {getLibraryCollectionDisplayName(collection)}</Link>))}<span>{table.display_name}</span>diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/utils.ts b/enterprise/frontend/src/metabase-enterprise/data-studio/library/utils.tsindex 94b2f5978ee..0c9719ebeac 100644--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/utils.ts+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/utils.ts@@ -189,13 +189,13 @@ export const getLibraryCollectionEmptyStateMessages = (if (type === "library-data") {return {title: t`No published tables yet`,- description: t`Publish tables in the Library to see them here.`,+ description: t`Publish tables in the semantic layer to see them here.`,};}return {title: t`No metrics yet`,- description: t`Put metrics in the Library to see them here.`,+ description: t`Put metrics in the semantic layer to see them here.`,};};diff --git a/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/DataComplexityCards.tsx b/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/DataComplexityCards.tsxindex 24751ba6e21..70e555b096f 100644--- a/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/DataComplexityCards.tsx+++ b/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/DataComplexityCards.tsx@@ -86,11 +86,11 @@ function DataComplexityCard({const { subtitle, title } = match(catalogId).with("library", () => ({title: t`Curated semantic layer`,- subtitle: t`Metrics and published tables within your Library.`,+ subtitle: t`Metrics and published tables within your semantic layer.`,})).with("universe", () => ({title: t`Full semantic layer`,- subtitle: t`Library entities plus every active physical table.`,+ subtitle: t`Semantic layer entities plus every active physical table.`,})).with("metabot", () => ({title: t`Metabot-visible layer`,diff --git a/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/__snapshots__/DataComplexityCards.unit.spec.tsx.snap b/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/__snapshots__/DataComplexityCards.unit.spec.tsx.snapindex 690f34eac3e..7756034debe 100644--- a/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/__snapshots__/DataComplexityCards.unit.spec.tsx.snap+++ b/enterprise/frontend/src/metabase-enterprise/monitor/ai-auditing/metabot-analytics/components/ConversationStatsPage/__snapshots__/DataComplexityCards.unit.spec.tsx.snap@@ -27,7 +27,7 @@ exports[`DataComplexityCards renders the data complexity cards 1`] = `color="text-primary"data-size="md">- Metrics and published tables within your Library.+ Metrics and published tables within your semantic layer.</div><div><div@@ -68,7 +68,7 @@ exports[`DataComplexityCards renders the data complexity cards 1`] = `color="text-primary"data-size="md">- Library entities plus every active physical table.+ Semantic layer entities plus every active physical table.</div><div><div@@ -150,7 +150,7 @@ exports[`DataComplexityCards renders the data complexity cards 2`] = `color="text-primary"data-size="sm">- Metrics and published tables within your Library.+ Metrics and published tables within your semantic layer.</div></div></h2>diff --git a/frontend/src/metabase/collections/components/CollectionEmptyState/CollectionEmptyState.unit.spec.tsx b/frontend/src/metabase/collections/components/CollectionEmptyState/CollectionEmptyState.unit.spec.tsxindex 049786d8577..9a627933b26 100644--- a/frontend/src/metabase/collections/components/CollectionEmptyState/CollectionEmptyState.unit.spec.tsx+++ b/frontend/src/metabase/collections/components/CollectionEmptyState/CollectionEmptyState.unit.spec.tsx@@ -82,7 +82,7 @@ describe("empty collection", () => {});describe("library sub-collection empty state", () => {- const PUBLISH_CTA = "Publish tables in the Library to see them here.";+ const PUBLISH_CTA = "Publish tables in the semantic layer to see them here.";const LIBRARY_DATA_COLLECTION = { type: "library-data" as const };it("shows the publish CTA to admins", async () => {@@ -123,7 +123,7 @@ describe("library sub-collection empty state", () => {});expect(- screen.getByText("Put metrics in the Library to see them here."),+ screen.getByText("Put metrics in the semantic layer to see them here."),).toBeInTheDocument();});});diff --git a/frontend/src/metabase/data-studio/common/components/Breadcrumbs/PublishedTableBreadcrumbs.tsx b/frontend/src/metabase/data-studio/common/components/Breadcrumbs/PublishedTableBreadcrumbs.tsxindex f71eaebfbcb..56c32f41f0c 100644--- a/frontend/src/metabase/data-studio/common/components/Breadcrumbs/PublishedTableBreadcrumbs.tsx+++ b/frontend/src/metabase/data-studio/common/components/Breadcrumbs/PublishedTableBreadcrumbs.tsx@@ -1,6 +1,7 @@import { Link } from "metabase/common/components/Link";import { DataStudioBreadcrumbs } from "metabase/common/data-studio/components/DataStudioBreadcrumbs";import { useCollectionPath } from "metabase/common/data-studio/hooks/use-collection-path/useCollectionPath";+import { getLibraryCollectionDisplayName } from "metabase/data-studio/common/utils";import * as Urls from "metabase/urls";import type { Table } from "metabase-types/api";@@ -30,7 +31,7 @@ export function PublishedTableBreadcrumbs({expandedIds: path.slice(1, i + 1).map((c) => c.id),})}>- {collection.name}+ {getLibraryCollectionDisplayName(collection)}</Link>))}<Link to={tableListUrl}>{table.display_name}</Link>diff --git a/frontend/src/metabase/data-studio/common/utils/get-library-collection-display-name.ts b/frontend/src/metabase/data-studio/common/utils/get-library-collection-display-name.tsnew file mode 100644index 00000000000..32b3daff69d--- /dev/null+++ b/frontend/src/metabase/data-studio/common/utils/get-library-collection-display-name.ts@@ -0,0 +1,9 @@+import { t } from "ttag";++import type { Collection } from "metabase-types/api";++export function getLibraryCollectionDisplayName(+ collection: Pick<Collection, "name" | "type">,+): string {+ return collection.type === "library" ? t`Semantic layer` : collection.name;+}diff --git a/frontend/src/metabase/data-studio/common/utils/index.ts b/frontend/src/metabase/data-studio/common/utils/index.tsindex ce25c80a5e5..62972102bfb 100644--- a/frontend/src/metabase/data-studio/common/utils/index.ts+++ b/frontend/src/metabase/data-studio/common/utils/index.ts@@ -9,6 +9,7 @@ import type {export { createEmptyStateItem } from "./create-empty-space-item";export { getDatasetQueryPreviewUrl } from "./get-dataset-query-preview-url";+export { getLibraryCollectionDisplayName } from "./get-library-collection-display-name";export { getResultMetadata } from "metabase/common/data-studio/utils/get-result-metadata";// TODO Alex P 12/05/2025 Fix the endpoint to return sensible datadiff --git a/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsx b/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsxindex 685a53dcbbe..81ea2607ba8 100644--- a/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsx+++ b/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsx@@ -293,7 +293,7 @@ const TableSectionBase = ({</Box><PLUGIN_LIBRARY.CreateLibraryModal- title={t`First, let's create your Library`}+ title={t`First, let's create your semantic layer`}explanatorySentence={t`This is where published tables will go.`}isOpened={modalType === "library"}onCreate={() => setModalType("publish")}diff --git a/frontend/src/metabase/data-studio/data-model/components/TableSection/components/TableAttributesEditBulk.tsx b/frontend/src/metabase/data-studio/data-model/components/TableSection/components/TableAttributesEditBulk.tsxindex e6680d0d381..23b3b4898c9 100644--- a/frontend/src/metabase/data-studio/data-model/components/TableSection/components/TableAttributesEditBulk.tsx+++ b/frontend/src/metabase/data-studio/data-model/components/TableSection/components/TableAttributesEditBulk.tsx@@ -307,7 +307,7 @@ export function TableAttributesEditBulk({</Stack><PLUGIN_LIBRARY.CreateLibraryModal- title={t`First, let's create your Library`}+ title={t`First, let's create your semantic layer`}explanatorySentence={t`This is where published tables will go.`}isOpened={modalType === "library"}onCreate={() => setModalType("publish")}diff --git a/frontend/src/metabase/data-studio/upsells/pages/LibraryUpsellPage.tsx b/frontend/src/metabase/data-studio/upsells/pages/LibraryUpsellPage.tsxindex 674c1c5f79b..64e9af8225d 100644--- a/frontend/src/metabase/data-studio/upsells/pages/LibraryUpsellPage.tsx+++ b/frontend/src/metabase/data-studio/upsells/pages/LibraryUpsellPage.tsx@@ -7,9 +7,9 @@ export function LibraryUpsellPage() {<BaseUpsellPagecampaign="data-studio-library"location="data-studio-library-page"- header={t`Library`}+ header={t`Semantic layer`}title={t`Bring more order to your analytics`}- description={t`Create a shared library of datasets and metrics your team can rely on, so things stay consistent as your data and downstream content grows.`}+ description={t`Create a shared semantic layer of datasets and metrics your team can rely on, so things stay consistent as your data and downstream content grows.`}image="app/assets/img/data-studio-library-upsell.svg"variant="image-full-height"/>diff --git a/src/metabase/collections/models/collection.clj b/src/metabase/collections/models/collection.cljindex 484c09d9bba..f0f58d4e9d0 100644--- a/src/metabase/collections/models/collection.clj+++ b/src/metabase/collections/models/collection.clj@@ -247,7 +247,7 @@"Create the Library collection. Returns Created collection. Throws if it already exists."[](when-not (nil? (library-collection))- (throw (ex-info "Library already exists" {})))+ (throw (ex-info "Semantic layer already exists" {})))(let [library (collections.db/insert-collection! {:name "Library":type library-collection-type:location "/"diff --git a/src/metabase/mcp/v2/tools/search.clj b/src/metabase/mcp/v2/tools/search.cljindex 5a8835032f3..4c0b8ce2191 100644--- a/src/metabase/mcp/v2/tools/search.clj+++ b/src/metabase/mcp/v2/tools/search.clj@@ -321,7 +321,7 @@(when (and (contains? types "table")(not (premium-features/has-feature? :library)))(common/throw-teaching-error- (message/msg [(str "Filtering tables by collection_id requires the Library feature, which "+ (message/msg [(str "Filtering tables by collection_id requires the semantic layer feature, which ""this instance doesn't have — remove table from type or drop collection_id.")])));; Two more types a collection-scoped search never covers, each dropped by a different part of;; the engine rather than by the spec's collection attr: transform (no collection recorded in@@ -340,7 +340,7 @@(swap! narrowed conj{:excluded #{"table"}:label "collection_id"- :because (message/raw "isn't filtered by collection without the Library feature")}))))+ :because (message/raw "isn't filtered by collection without the semantic layer feature")}))))(when (true? archived)(when-let [bad (seq (sort (filter non-archivable-types effective-types)))](if type-omitted?diff --git a/src/metabase/warehouse_schema_rest/api/table.clj b/src/metabase/warehouse_schema_rest/api/table.cljindex a19df77e6b9..1d635ffbc76 100644--- a/src/metabase/warehouse_schema_rest/api/table.clj+++ b/src/metabase/warehouse_schema_rest/api/table.clj@@ -261,7 +261,7 @@(api/check-data-studio-access)(let [collection (api/check-404 (warehouse-schema-rest.db/collection collection-id))](api/check-400 (= (:type collection) collections/library-data-collection-type)- (tru "Tables can only be published to Library/Data collections."))+ (tru "Tables can only be published to Semantic layer/Data collections."))(api/check-403 (every? mi/can-query? tables))))(defn- update-tables!diff --git a/test/metabase/collections/models/collection_test.clj b/test/metabase/collections/models/collection_test.cljindex 81ff49684b1..c01c179d323 100644--- a/test/metabase/collections/models/collection_test.clj+++ b/test/metabase/collections/models/collection_test.clj@@ -3324,7 +3324,7 @@(is (true? (mi/can-read? sub)))(is (false? (mi/can-write? sub))))))))(testing "Creating a Layer when one already exists throws an exception"- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Library already exists" (collection/create-library-collection!))))+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"Semantic layer already exists" (collection/create-library-collection!))));;cleanup created libraries(t2/delete! :model/Collection :type [:in [collection/library-collection-typecollection/library-data-collection-typediff --git a/test/metabase/mcp/v2/tools/search_test.clj b/test/metabase/mcp/v2/tools/search_test.cljindex 30a3b4f2343..b5ac0c7bd53 100644--- a/test/metabase/mcp/v2/tools/search_test.clj+++ b/test/metabase/mcp/v2/tools/search_test.clj@@ -132,7 +132,7 @@(testing "GHY-4137: filtering tables by a real collection_id requires the Library feature; on aninstance without it the combination is a teaching error, but \"root\" stays inert"(mt/with-premium-features #{}- (is (thrown-with-msg? clojure.lang.ExceptionInfo #"requires the Library feature"+ (is (thrown-with-msg? clojure.lang.ExceptionInfo #"requires the semantic layer feature"(validate-filters! {:type ["table"] :collection_id "someEntityId01234567_"}))"no Library feature + real collection id: error")(is (some? (validate-filters! {:type ["table"] :collection_id "root"}))@@ -242,7 +242,7 @@(let [{:keys [types disclosures]} (validate-filters! {:collection_id "someEntityId01234567_"})](is (not (contains? (set types) "table"))"table is narrowed out, not left in for the engine to drop quietly")- (is (some #(re-find #"Library feature" %) disclosures)+ (is (some #(re-find #"semantic layer feature" %) disclosures)"and the caller is told why")(is (not (contains? (set types) "transform"))"transform has no collection in the index, so the engine drops it from a@@ -254,7 +254,7 @@(mt/with-premium-features #{:library}(let [{:keys [types disclosures]} (validate-filters! {:collection_id "someEntityId01234567_"})](is (contains? (set types) "table"))- (is (not (some #(re-find #"Library feature" %) disclosures)))+ (is (not (some #(re-find #"semantic layer feature" %) disclosures)))(is (not (contains? (set types) "transform"))"the Library feature says nothing about transforms — they stay narrowed"))))(testing "\"root\" is inert — it scopes nothing, so it must not trip the table narrowing"