Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Smol fix ETl (#40618)

Joshen Limfe04045aa433
diff --git a/apps/studio/components/interfaces/Database/ETL/DestinationPanel/DestinationPanel.tsx b/apps/studio/components/interfaces/Database/ETL/DestinationPanel/DestinationPanel.tsx
index c37832da73a..bfc4f9cd6f1 100644
--- a/apps/studio/components/interfaces/Database/ETL/DestinationPanel/DestinationPanel.tsx
+++ b/apps/studio/components/interfaces/Database/ETL/DestinationPanel/DestinationPanel.tsx
@@ -6,6 +6,7 @@ import { toast } from 'sonner'
import * as z from 'zod'
import { useFlag, useParams } from 'common'
+import { useApiKeysVisibility } from 'components/interfaces/APIKeys/hooks/useApiKeysVisibility'
import { getCatalogURI } from 'components/interfaces/Storage/StorageSettings/StorageSettings.utils'
import { getKeys, useAPIKeysQuery } from 'data/api-keys/api-keys-query'
import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query'
@@ -44,7 +45,6 @@ import { AnalyticsBucketFields, BigQueryFields } from './DestinationPanelFields'
import { DestinationTypeSelection } from './DestinationTypeSelection'
import { NoDestinationsAvailable } from './NoDestinationsAvailable'
import { PublicationSelection } from './PublicationSelection'
-import { useApiKeysVisibility } from 'components/interfaces/APIKeys/hooks/useApiKeysVisibility'
const formId = 'destination-editor'
@@ -109,7 +109,7 @@ export const DestinationPanel = ({
useS3AccessKeyCreateMutation()
const { mutateAsync: createNamespace, isLoading: isCreatingNamespace } =
- useIcebergNamespaceCreateMutation()
+ useIcebergNamespaceCreateMutation({ projectRef })
const {
data: publications = [],
diff --git a/apps/studio/data/storage/iceberg-namespaces-query.ts b/apps/studio/data/storage/iceberg-namespaces-query.ts
index 494b953cbea..f770e7d3320 100644
--- a/apps/studio/data/storage/iceberg-namespaces-query.ts
+++ b/apps/studio/data/storage/iceberg-namespaces-query.ts
@@ -18,6 +18,7 @@ async function getNamespaces({
warehouse,
tempApiKey,
}: GetNamespacesVariables & { tempApiKey?: string }) {
+ console.log('getNamespaces', { warehouse })
try {
if (!tempApiKey) throw new Error(`${errorPrefix}: API Key missing`)
@@ -71,7 +72,9 @@ export const useIcebergNamespacesQuery = <TData = IcebergNamespacesData>(
typeof projectRef !== 'undefined' &&
typeof tempApiKey !== 'undefined' &&
typeof catalogUri !== 'undefined' &&
- typeof warehouse !== 'undefined',
+ catalogUri.length > 0 &&
+ typeof warehouse !== 'undefined' &&
+ warehouse.length > 0,
...options,
})
}