From 185759d563b97e573f47ee4912a271c578a3913d Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Wed, 22 Apr 2026 12:44:37 -0400 Subject: [PATCH 1/4] fix: trust YAML for live-connector metrics views to avoid BQ table-list hang For a metrics view with an explicit connector/database/database_schema/table, the visual editor was blocking the table display on OLAPListTables, which walks every dataset in BigQuery and rarely completes. The editor now trusts the YAML fields directly in that case, and hides the 'Select model' mode switch since live-connector views never select a Rill model. Co-Authored-By: Claude Opus 4.7 --- .../features/workspaces/VisualMetrics.svelte | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/web-common/src/features/workspaces/VisualMetrics.svelte b/web-common/src/features/workspaces/VisualMetrics.svelte index a3936d3bb39..0c380f3b826 100644 --- a/web-common/src/features/workspaces/VisualMetrics.svelte +++ b/web-common/src/features/workspaces/VisualMetrics.svelte @@ -266,6 +266,13 @@ measureNamesAndLabels.label, ); + // When the metrics view YAML already specifies a live connector, trust the + // YAML fields (connector/database/database_schema/table) directly rather than + // walking every dataset via OLAPListTables. For warehouses like BigQuery, that + // enumeration issues an INFORMATION_SCHEMA.TABLES query per dataset and often + // never completes in projects with many datasets. + $: hasLiveConnectorYAML = Boolean(yamlConnector && modelOrSourceOrTableName); + $: tablesQuery = createConnectorServiceOLAPListTables( runtimeClient, { connector }, @@ -274,7 +281,8 @@ enabled: !!runtimeClient.instanceId && !!connector && - !hasValidModelOrSourceSelection, + !hasValidModelOrSourceSelection && + !hasLiveConnectorYAML, }, }, ); @@ -284,12 +292,13 @@ $: hasValidOLAPTableSelected = !hasValidModelOrSourceSelection && modelOrSourceOrTableName && - tables.find( - (table) => - table.name === modelOrSourceOrTableName && - (!database || table.database === database) && - (!databaseSchema || table.databaseSchema === databaseSchema), - ); + (hasLiveConnectorYAML || + tables.find( + (table) => + table.name === modelOrSourceOrTableName && + (!database || table.database === database) && + (!databaseSchema || table.databaseSchema === databaseSchema), + )); $: tableMode = Boolean(hasValidOLAPTableSelected); @@ -552,7 +561,7 @@
- {#if isModelingSupported} + {#if isModelingSupported && !yamlConnector}