Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): label Trino SQL connections correctly (#93743)

Bill Guowei Yangaa9e2b491702
diff --git a/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.test.ts b/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.test.ts
index 896f3eacea4d..b13f8b2fb34c 100644
--- a/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.test.ts
+++ b/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.test.ts
@@ -45,6 +45,16 @@ describe('connectionSelectorLogic', () => {
supports_hogql: true,
is_builtin_managed_warehouse: false,
},
+ {
+ id: 'conn-trino',
+ description: 'Managed Warehouse Trino',
+ prefix: 'trino',
+ engine: 'trino',
+ source_type: 'Trino',
+ access_method: 'direct',
+ supports_hogql: false,
+ is_builtin_managed_warehouse: false,
+ },
])
})
@@ -83,6 +93,11 @@ describe('connectionSelectorLogic', () => {
label: 'prod (MySQL · synced)',
managementUrl: urls.dataWarehouseSource('managed-conn-456'),
}),
+ expect.objectContaining({
+ value: 'conn-trino',
+ label: 'Managed Warehouse Trino (Trino)',
+ managementUrl: urls.dataWarehouseSource('managed-conn-trino'),
+ }),
])
)
expect(logic.values.connectionSelectOptions[1].options).toEqual(
diff --git a/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.ts b/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.ts
index 7f47fc5d9ccf..3323be25ce0c 100644
--- a/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.ts
+++ b/frontend/src/scenes/data-warehouse/editor/connectionSelectorLogic.ts
@@ -12,6 +12,7 @@ import IconMySQL from 'public/services/mysql.png'
import IconPostgres from 'public/services/postgres.png'
import IconRedshift from 'public/services/redshift.png'
import IconSnowflake from 'public/services/snowflake.png'
+import IconTrino from 'public/services/trino.svg'
import { sourcesDataLogic } from 'products/data_warehouse/frontend/shared/logics/sourcesDataLogic'
import {
@@ -47,7 +48,15 @@ export interface ConnectionSelectOptionGroup {
options: ConnectionSelectOption[]
}
-type ConnectionEngine = 'duckdb' | 'postgres' | 'mysql' | 'snowflake' | 'redshift' | 'clickhouse' | 'motherduck'
+type ConnectionEngine =
+ | 'duckdb'
+ | 'postgres'
+ | 'mysql'
+ | 'snowflake'
+ | 'redshift'
+ | 'clickhouse'
+ | 'motherduck'
+ | 'trino'
const ENGINE_LABELS: Record<ConnectionEngine, string> = {
duckdb: 'DuckDB',
@@ -57,6 +66,7 @@ const ENGINE_LABELS: Record<ConnectionEngine, string> = {
redshift: 'Redshift',
clickhouse: 'ClickHouse',
motherduck: 'MotherDuck',
+ trino: 'Trino',
}
const ENGINE_ICONS: Record<ConnectionEngine, string> = {
@@ -67,6 +77,7 @@ const ENGINE_ICONS: Record<ConnectionEngine, string> = {
redshift: IconRedshift,
clickhouse: IconClickHouse,
motherduck: IconMotherDuck,
+ trino: IconTrino,
}
function getConnectionEngine(
@@ -78,7 +89,8 @@ function getConnectionEngine(
source.engine === 'snowflake' ||
source.engine === 'redshift' ||
source.engine === 'clickhouse' ||
- source.engine === 'motherduck'
+ source.engine === 'motherduck' ||
+ source.engine === 'trino'
) {
return source.engine
}