diff --git a/packages/server/src/integrations/utils.ts b/packages/server/src/integrations/utils.ts index 326b213bc7..16cc6d387e 100644 --- a/packages/server/src/integrations/utils.ts +++ b/packages/server/src/integrations/utils.ts @@ -85,9 +85,9 @@ export function breakExternalTableId(tableId: string | undefined) { return {} } const parts = tableId.split(DOUBLE_SEPARATOR) - let tableName = parts.pop() + let datasourceId = parts.shift() // if they need joined - let datasourceId = parts.join(DOUBLE_SEPARATOR) + let tableName = parts.join(DOUBLE_SEPARATOR) return { datasourceId, tableName } }