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): surface file-storage connectors when searching a file format (#72149)

Tom Owers38b09901f939
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts
index 982133dc4fe1..ea088c08026a 100644
--- a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts
+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceCatalogLogic.ts
@@ -46,6 +46,11 @@ const MANUAL_SOURCE_KEYWORDS: Record<string, string[]> = {
azure: ['azure', 'microsoft azure', 'azure blob', 'blob storage'],
}
+// Every self-managed connector links files from a bucket, so a user searching for a file
+// format ("csv", "parquet") should land on them rather than an empty result that pushes
+// them to request a source we already support. Matches the formats the link form accepts.
+const FILE_STORAGE_FORMAT_KEYWORDS = ['csv', 'parquet', 'delta', 'file', 'files', 'flat file']
+
// "Request a data warehouse source" survey. We render our own modal and submit the answer
// directly as a `survey sent` event rather than using the posthog-js survey popover.
export const SOURCE_REQUEST_SURVEY_ID = '0190ff15-5032-0000-722a-e13933c140ac'
@@ -1984,7 +1989,7 @@ export const sourceCatalogLogic = kea<sourceCatalogLogicType>([
label: source.name,
iconType: source.type,
category: MANUAL_SOURCE_CATEGORY,
- keywords: MANUAL_SOURCE_KEYWORDS[source.type] ?? [],
+ keywords: [...(MANUAL_SOURCE_KEYWORDS[source.type] ?? []), ...FILE_STORAGE_FORMAT_KEYWORDS],
status: 'stable',
url: urls.dataWarehouseSourceNew(source.type),
selfManaged: true,
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceCatalogLogic.test.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceCatalogLogic.test.ts
index ff6f6ec8e94f..f43aefe72ea8 100644
--- a/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceCatalogLogic.test.ts
+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceCatalogLogic.test.ts
@@ -71,6 +71,16 @@ describe('sourceCatalogLogic', () => {
expect(names.indexOf('Zebra')).toBeLessThan(names.indexOf('Apple'))
})
+ it('surfaces self-managed file-storage connectors when searching for a file format', () => {
+ const logic = sourceCatalogLogic()
+ logic.actions.setSearch('csv')
+
+ // CSV files are imported via the self-managed bucket connectors, so a "csv" search must
+ // find them instead of dead-ending on "no sources match".
+ const names = logic.values.filteredItems.map((item) => item.name)
+ expect(names).toContain('aws')
+ })
+
it('clears the request text when the modal is closed', () => {
const logic = sourceCatalogLogic()
logic.actions.setSearch('Podium')