diff --git a/web-common/src/features/connectors/ConnectorExplorer.svelte b/web-common/src/features/connectors/ConnectorExplorer.svelte
index dc841e8e966..e61f130e501 100644
--- a/web-common/src/features/connectors/ConnectorExplorer.svelte
+++ b/web-common/src/features/connectors/ConnectorExplorer.svelte
@@ -85,6 +85,8 @@
}
.message {
- @apply pl-2 pr-3.5 pt-2 pb-2 text-gray-500;
+ @apply pl-2 pr-3.5 py-2;
+ @apply text-gray-500;
+ @apply text-wrap;
}
diff --git a/web-common/src/features/connectors/olap/DatabaseSchemaEntry.svelte b/web-common/src/features/connectors/olap/DatabaseSchemaEntry.svelte
index 2c3a7c55c63..f6c84b1d6cc 100644
--- a/web-common/src/features/connectors/olap/DatabaseSchemaEntry.svelte
+++ b/web-common/src/features/connectors/olap/DatabaseSchemaEntry.svelte
@@ -56,11 +56,18 @@
{#if showTables}
- {#if typedData && typedData.length > 0}
+ {#if connector?.errorMessage}
+
{connector.errorMessage}
+ {:else if !connector.driver || !connector.driver.name}
+ Connector not found
+ {:else if !typedData || typedData.length === 0}
+ No tables found
+ {:else if typedData.length > 0}
{#each typedData as tableInfo (tableInfo)}
diff --git a/web-common/src/features/connectors/olap/TableEntry.svelte b/web-common/src/features/connectors/olap/TableEntry.svelte
index e43812a4c24..6a6a3e3e825 100644
--- a/web-common/src/features/connectors/olap/TableEntry.svelte
+++ b/web-common/src/features/connectors/olap/TableEntry.svelte
@@ -14,7 +14,8 @@
makeTablePreviewHref,
} from "./olap-config";
- export let connectorInstanceId: string;
+ export let instanceId: string;
+ export let driver: string;
export let connector: string;
export let database: string; // The backend interprets an empty string as the default database
export let databaseSchema: string; // The backend interprets an empty string as the default schema
@@ -25,16 +26,23 @@
let showSchema = false;
$: fullyQualifiedTableName = makeFullyQualifiedTableName(
+ driver,
+ database,
+ databaseSchema,
+ table,
+ );
+ $: tableId = `${connector}-${fullyQualifiedTableName}`;
+ $: href = makeTablePreviewHref(
+ driver,
connector,
database,
databaseSchema,
table,
);
- $: href = makeTablePreviewHref(connector, database, databaseSchema, table);
$: open = $page.url.pathname === href;
--
+
-
diff --git a/web-common/src/features/connectors/olap/TableMenuItems.svelte b/web-common/src/features/connectors/olap/TableMenuItems.svelte
index b05cdac70aa..da1e431c930 100644
--- a/web-common/src/features/connectors/olap/TableMenuItems.svelte
+++ b/web-common/src/features/connectors/olap/TableMenuItems.svelte
@@ -21,6 +21,7 @@
const { ai } = featureFlags;
+ export let driver: string;
export let connector: string;
export let database: string = "";
export let databaseSchema: string = "";
@@ -28,7 +29,13 @@
$: isModelingSupportedForCurrentOlapDriver =
useIsModelingSupportedForCurrentOlapDriver($runtime.instanceId);
- $: href = makeTablePreviewHref(connector, database, databaseSchema, table);
+ $: href = makeTablePreviewHref(
+ driver,
+ connector,
+ database,
+ databaseSchema,
+ table,
+ );
$: createDashboardFromTable = useCreateDashboardFromTableUIAction(
$runtime.instanceId,
connector,
diff --git a/web-common/src/features/connectors/olap/TableWorkspaceHeader.svelte b/web-common/src/features/connectors/olap/TableWorkspaceHeader.svelte
index c13fca49f3c..d3ce106af5b 100644
--- a/web-common/src/features/connectors/olap/TableWorkspaceHeader.svelte
+++ b/web-common/src/features/connectors/olap/TableWorkspaceHeader.svelte
@@ -12,7 +12,6 @@
import { runtime } from "../../../runtime-client/runtime-store";
import { featureFlags } from "../../feature-flags";
import { useCreateDashboardFromTableUIAction } from "../../metrics-views/ai-generation/generateMetricsView";
- import { makeFullyQualifiedTableName } from "./olap-config";
export let connector: string;
export let database: string = "";
@@ -21,13 +20,6 @@
const { ai } = featureFlags;
- $: fullyQualifiedTableName = makeFullyQualifiedTableName(
- connector,
- database,
- databaseSchema,
- table,
- );
-
$: createDashboardFromTable = useCreateDashboardFromTableUIAction(
$runtime.instanceId,
connector,
@@ -48,7 +40,7 @@
{@const collapse = isHeaderWidthSmall(headerWidth)}
diff --git a/web-common/src/features/connectors/olap/olap-config.ts b/web-common/src/features/connectors/olap/olap-config.ts
index 02d5e9e5ced..9c6b10a36d3 100644
--- a/web-common/src/features/connectors/olap/olap-config.ts
+++ b/web-common/src/features/connectors/olap/olap-config.ts
@@ -1,43 +1,42 @@
export const OLAP_DRIVERS_WITHOUT_MODELING = ["clickhouse", "druid", "pinot"];
export function makeFullyQualifiedTableName(
- connector: string,
+ driver: string,
database: string,
databaseSchema: string,
table: string,
) {
- switch (connector) {
+ switch (driver) {
case "clickhouse":
return `${databaseSchema}.${table}`;
case "druid":
return `${databaseSchema}.${table}`;
case "duckdb":
- // return `${database}.${databaseSchema}.${table}`;
- // For now, only show the table name
- return table;
+ return `${database}.${databaseSchema}.${table}`;
case "pinot":
return table;
default:
- throw new Error(`Unsupported OLAP connector: ${connector}`);
+ throw new Error(`Unsupported OLAP connector: ${driver}`);
}
}
export function makeTablePreviewHref(
- connector: string,
+ driver: string,
+ connectorName: string,
database: string,
databaseSchema: string,
table: string,
): string {
- switch (connector) {
+ switch (driver) {
case "clickhouse":
- return `/connector/clickhouse/${databaseSchema}/${table}`;
+ return `/connector/clickhouse/${connectorName}/${databaseSchema}/${table}`;
case "druid":
- return `/connector/druid/${databaseSchema}/${table}`;
+ return `/connector/druid/${connectorName}/${databaseSchema}/${table}`;
case "duckdb":
- return `/connector/duckdb/${database}/${databaseSchema}/${table}`;
+ return `/connector/duckdb/${connectorName}/${database}/${databaseSchema}/${table}`;
case "pinot":
- return `/connector/pinot/${table}`;
+ return `/connector/pinot/${connectorName}/${table}`;
default:
- throw new Error(`Unsupported connector: ${connector}`);
+ throw new Error(`Unsupported connector: ${driver}`);
}
}
diff --git a/web-local/src/routes/(application)/connector/clickhouse/[database]/[table]/+page.svelte b/web-local/src/routes/(application)/connector/clickhouse/[name]/[database]/[table]/+page.svelte
similarity index 87%
rename from web-local/src/routes/(application)/connector/clickhouse/[database]/[table]/+page.svelte
rename to web-local/src/routes/(application)/connector/clickhouse/[name]/[database]/[table]/+page.svelte
index 94ec606c613..9a42c084764 100644
--- a/web-local/src/routes/(application)/connector/clickhouse/[database]/[table]/+page.svelte
+++ b/web-local/src/routes/(application)/connector/clickhouse/[name]/[database]/[table]/+page.svelte
@@ -7,6 +7,7 @@
const { readOnly } = featureFlags;
+ $: name = $page.params.name;
$: database = $page.params.database;
// ClickHouse does not have a database "schema" concept
// Rill considers the ClickHouse "database" as the "database schema"
@@ -23,8 +24,4 @@
Rill Developer | {table}
-
+
diff --git a/web-local/src/routes/(application)/connector/druid/[schema]/[table]/+page.svelte b/web-local/src/routes/(application)/connector/druid/[name]/[schema]/[table]/+page.svelte
similarity index 87%
rename from web-local/src/routes/(application)/connector/druid/[schema]/[table]/+page.svelte
rename to web-local/src/routes/(application)/connector/druid/[name]/[schema]/[table]/+page.svelte
index 81d96ba52a5..e24f187a48d 100644
--- a/web-local/src/routes/(application)/connector/druid/[schema]/[table]/+page.svelte
+++ b/web-local/src/routes/(application)/connector/druid/[name]/[schema]/[table]/+page.svelte
@@ -7,6 +7,7 @@
const { readOnly } = featureFlags;
+ $: name = $page.params.name;
// Druid does not have a "database" concept
$: databaseSchema = $page.params.schema;
$: table = $page.params.table;
@@ -22,4 +23,4 @@
Rill Developer | {table}
-
+
diff --git a/web-local/src/routes/(application)/connector/duckdb/[database]/[schema]/[table]/+page.svelte b/web-local/src/routes/(application)/connector/duckdb/[name]/[database]/[schema]/[table]/+page.svelte
similarity index 85%
rename from web-local/src/routes/(application)/connector/duckdb/[database]/[schema]/[table]/+page.svelte
rename to web-local/src/routes/(application)/connector/duckdb/[name]/[database]/[schema]/[table]/+page.svelte
index 558cd1ffad8..f9037414700 100644
--- a/web-local/src/routes/(application)/connector/duckdb/[database]/[schema]/[table]/+page.svelte
+++ b/web-local/src/routes/(application)/connector/duckdb/[name]/[database]/[schema]/[table]/+page.svelte
@@ -7,6 +7,7 @@
const { readOnly } = featureFlags;
+ $: name = $page.params.name;
$: database = $page.params.database;
$: databaseSchema = $page.params.schema;
$: table = $page.params.table;
@@ -22,4 +23,4 @@
Rill Developer | {table}
-
+
diff --git a/web-local/src/routes/(application)/connector/pinot/[table]/+page.svelte b/web-local/src/routes/(application)/connector/pinot/[name]/[table]/+page.svelte
similarity index 87%
rename from web-local/src/routes/(application)/connector/pinot/[table]/+page.svelte
rename to web-local/src/routes/(application)/connector/pinot/[name]/[table]/+page.svelte
index cba55908235..fe208767832 100644
--- a/web-local/src/routes/(application)/connector/pinot/[table]/+page.svelte
+++ b/web-local/src/routes/(application)/connector/pinot/[name]/[table]/+page.svelte
@@ -7,6 +7,7 @@
const { readOnly } = featureFlags;
+ $: name = $page.params.name;
$: table = $page.params.table;
onMount(() => {
@@ -20,4 +21,4 @@
Rill Developer | {table}
-
+