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.

feat(data-warehouse): refresh onboarding sources and add setup wizard (#66139)

Tom Owers8163dbef0968
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 9772aaca475a..49ab5fe8b4a5 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -7077,9 +7077,9 @@ snapshots:
scenes-other-onboarding--invite-teammates--light:
hash: v1.k794b7964.9eeb0a5a8dfe6dec0f305c56213c7435e21b59a4e43aa01a2ce17f68cb67245d.NHivw8NjyCDKjPEyosSA5-MKbZjW6TwWNGvZpPIs8oE
scenes-other-onboarding--link-data--dark:
- hash: v1.k794b7964.729b6d650f9f970660d9bd2176479959ada2920e63c9840b03f046e40e4d9e7a.ghq-4-BdJ3sYpoxjgp2hXP40zaf9By2Ou3mAlzGLEns
+ hash: v1.k794b7964.277478ac411e8602a54cbb06b46fb04271729562912ec6603bf7057dd79be599.vAruz5_q2S9VtwQIZR523sjXv7l9ssZOqvBjhmUKh8Q
scenes-other-onboarding--link-data--light:
- hash: v1.k794b7964.6bb749ad27cd5d98035a1fcbb0145dd93354f4a436ad9a7561cc3a879e47c28b.oKTxm-f5tLQtrCH-T2Se38qHGyqpdmvIfVAcnVAbyfw
+ hash: v1.k794b7964.ecd5c5a50852efb899d5c44edb1d5fffac10cc98283152a3c6a28ef9d89c65c6.dGz_soY60SZDKhxvVkx1PcT_TibV2tiAS_28jwWxGZ4
scenes-other-onboarding--product-analytics-configuration--dark:
hash: v1.k794b7964.08af688052c51fafa75fdcdc3754e7289fc18fb53596a2e928daa418aa02859d.lTGrMS9pD0saS4FeHB0VzmPt5pJKMMHzVx2nVd95gEY
scenes-other-onboarding--product-analytics-configuration--light:
diff --git a/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseQueryVariant.tsx b/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseQueryVariant.tsx
index 48ff39e9ba59..57d74adea1ef 100644
--- a/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseQueryVariant.tsx
+++ b/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseQueryVariant.tsx
@@ -318,6 +318,7 @@ function DataWarehouseQueryInner(): JSX.Element {
<InlineSourceSetup
onComplete={handleSourceConnected}
featured
+ showWizard
title="Choose a source"
subtitle="You can always connect more sources later."
/>
diff --git a/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseValuePropVariant.tsx b/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseValuePropVariant.tsx
index c0b647df6252..831e169d9edb 100644
--- a/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseValuePropVariant.tsx
+++ b/frontend/src/scenes/onboarding/legacy/data-warehouse/DataWarehouseValuePropVariant.tsx
@@ -173,6 +173,7 @@ function DataWarehouseValuePropInner(): JSX.Element {
<InlineSourceSetup
onComplete={handleSourceConnected}
featured
+ showWizard
title="Choose a source"
subtitle="You can always connect more sources later."
/>
diff --git a/frontend/src/scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx b/frontend/src/scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx
index e303170d72ba..0845f0963142 100644
--- a/frontend/src/scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx
+++ b/frontend/src/scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx
@@ -42,6 +42,7 @@ export const OnboardingDataWarehouseSourcesStep: OnboardingStepComponentType = (
goToNextStep()
}}
featured
+ showWizard
title="Choose from 20+ sources"
subtitle="You can always connect more sources later."
/>
diff --git a/frontend/src/scenes/onboarding/shared/SetupWizardBanner.tsx b/frontend/src/scenes/onboarding/shared/SetupWizardBanner.tsx
index 6659c843fbce..effaa34fbde0 100644
--- a/frontend/src/scenes/onboarding/shared/SetupWizardBanner.tsx
+++ b/frontend/src/scenes/onboarding/shared/SetupWizardBanner.tsx
@@ -9,11 +9,12 @@ import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { Region } from '~/types'
-export function useWizardCommand(): { wizardCommand: string; isCloudOrDev: boolean } {
+export function useWizardCommand(subcommand?: string): { wizardCommand: string; isCloudOrDev: boolean } {
const { preflight, isCloudOrDev } = useValues(preflightLogic)
const region = preflight?.region || Region.US
+ const subcommandPart = subcommand ? ` ${subcommand}` : ''
return {
- wizardCommand: `npx -y @posthog/wizard@latest${region === Region.EU ? ' --region eu' : ''}`,
+ wizardCommand: `npx -y @posthog/wizard@latest${subcommandPart}${region === Region.EU ? ' --region eu' : ''}`,
isCloudOrDev: isCloudOrDev ?? false,
}
}
diff --git a/products/data_warehouse/frontend/shared/components/DataWarehouseWizardBlock.tsx b/products/data_warehouse/frontend/shared/components/DataWarehouseWizardBlock.tsx
new file mode 100644
index 000000000000..c4a80ca009d8
--- /dev/null
+++ b/products/data_warehouse/frontend/shared/components/DataWarehouseWizardBlock.tsx
@@ -0,0 +1,42 @@
+import { CommandBlock } from 'lib/components/CommandBlock/CommandBlock'
+import { useWizardCommand } from 'scenes/onboarding/shared/SetupWizardBanner'
+
+import { ExternalDataSourceType } from '~/queries/schema/schema-general'
+
+import { SourceIcon } from './SourceIcon'
+
+// Database sources the warehouse wizard can detect and connect from a codebase.
+const WIZARD_DETECTABLE_SOURCES: ExternalDataSourceType[] = ['Postgres', 'MySQL', 'Supabase', 'MongoDB', 'BigQuery']
+
+export function DataWarehouseWizardBlock(): JSX.Element {
+ const { wizardCommand, isCloudOrDev } = useWizardCommand('warehouse')
+
+ // The wizard CLI only targets cloud (US/EU) and dev instances — self-hosted has no
+ // preconfigured endpoint, so hide the block rather than show a command that can't work.
+ if (!isCloudOrDev) {
+ return <></>
+ }
+
+ return (
+ <div className="flex flex-col gap-2 p-3 rounded-lg border border-primary bg-bg-light">
+ <div className="flex items-center gap-2">
+ <span className="font-semibold text-sm">Connect from your codebase</span>
+ {WIZARD_DETECTABLE_SOURCES.map((type) => (
+ <SourceIcon key={type} type={type} size="small" disableTooltip />
+ ))}
+ </div>
+ <p className="text-xs text-muted mb-1">
+ Run this from your project root — the wizard auto-detects databases like Postgres, MySQL, Supabase,
+ MongoDB and BigQuery and connects them for you.
+ </p>
+ <CommandBlock
+ command={wizardCommand}
+ copyLabel="Data warehouse wizard command"
+ ariaLabel="Copy data warehouse wizard command"
+ size="md"
+ decoration="rainbow"
+ className="bg-bg-light border border-border hover:border-primary"
+ />
+ </div>
+ )
+}
diff --git a/products/data_warehouse/frontend/shared/components/InlineSourceSetup.tsx b/products/data_warehouse/frontend/shared/components/InlineSourceSetup.tsx
index 04f9f4747bbb..14ac13d483e7 100644
--- a/products/data_warehouse/frontend/shared/components/InlineSourceSetup.tsx
+++ b/products/data_warehouse/frontend/shared/components/InlineSourceSetup.tsx
@@ -9,6 +9,7 @@ import { ExternalDataSourceType, SourceConfig } from '~/queries/schema/schema-ge
import { availableSourcesLogic } from '../../scenes/NewSourceScene/availableSourcesLogic'
import { NewSourcesWizard } from '../../scenes/NewSourceScene/NewSourceScene'
import { sourceWizardLogic } from '../../scenes/NewSourceScene/sourceWizardLogic'
+import { DataWarehouseWizardBlock } from './DataWarehouseWizardBlock'
import { SourceIcon } from './SourceIcon'
export type InlineSourceSetupView = 'selection' | 'connecting'
@@ -27,6 +28,8 @@ export interface InlineSourceSetupProps {
title?: string
/** Custom subtitle for the source selection */
subtitle?: string
+ /** When true, show the CLI wizard block as a fast path above the source grid (cloud/dev only) */
+ showWizard?: boolean
}
function InternalInlineSourceSetup({
@@ -34,6 +37,7 @@ function InternalInlineSourceSetup({
featured = false,
title = 'Connect a data source',
subtitle = 'Choose a source to import data from',
+ showWizard = false,
}: InlineSourceSetupProps): JSX.Element {
const { connectors } = useValues(sourceWizardLogic)
const { onClear } = useActions(sourceWizardLogic)
@@ -87,6 +91,8 @@ function InternalInlineSourceSetup({
</div>
</div>
+ {showWizard && <DataWarehouseWizardBlock />}
+
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3">
{sourceItems.map((source) => (
<div
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/bigquery/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/bigquery/source.py
index f5da9d40eea4..bceb1524f58c 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/bigquery/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/bigquery/source.py
@@ -198,6 +198,7 @@ class BigQuerySource(SQLSource[BigQuerySourceConfig]):
return SourceConfig(
name=SchemaExternalDataSourceType.BIG_QUERY,
category=DataWarehouseSourceCategory.DATABASES,
+ featured=True,
iconPath="/static/services/bigquery.png",
docsUrl="https://posthog.com/docs/cdp/sources/bigquery",
fields=cast(
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py
index e850e5921020..aa9b0343c41d 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py
@@ -89,6 +89,7 @@ class GithubSource(
return SourceConfig(
name=SchemaExternalDataSourceType.GITHUB,
category=DataWarehouseSourceCategory.ENGINEERING___MONITORING,
+ featured=True,
label="GitHub",
releaseStatus=ReleaseStatus.GA,
caption="Connect your GitHub repository to sync issues, pull requests, commits, and more.",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/source.py
index d638d05c612a..04ed6595ecdf 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/source.py
@@ -163,6 +163,7 @@ class GoogleAdsSource(
return SourceConfig(
name=SchemaExternalDataSourceType.GOOGLE_ADS,
category=DataWarehouseSourceCategory.ADVERTISING,
+ featured=True,
keywords=["adwords"],
label="Google Ads",
caption="Ensure you have granted PostHog access to your Google Ads account, learn how to do this in [the docs](https://posthog.com/docs/cdp/sources/google-ads).",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/linkedin_ads/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/linkedin_ads/source.py
index 1bfdabcd4c97..b49f0401b7a9 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/linkedin_ads/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/linkedin_ads/source.py
@@ -88,6 +88,7 @@ class LinkedInAdsSource(ResumableSource[LinkedinAdsSourceConfig, LinkedInAdsResu
return SourceConfig(
name=SchemaExternalDataSourceType.LINKEDIN_ADS,
category=DataWarehouseSourceCategory.ADVERTISING,
+ featured=True,
keywords=["linkedin advertising"],
label="LinkedIn Ads",
caption="Ensure you have granted PostHog access to your LinkedIn Ads account, learn how to do this in [the documentation](https://posthog.com/docs/cdp/sources/linkedin-ads).",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py
index 0fbe4047036d..2dda46cb7046 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py
@@ -129,6 +129,7 @@ class MetaAdsSource(ResumableSource[MetaAdsSourceConfig, MetaAdsResumeConfig]):
return SourceConfig(
name=SchemaExternalDataSourceType.META_ADS,
category=DataWarehouseSourceCategory.ADVERTISING,
+ featured=True,
keywords=["facebook ads", "instagram ads"],
label="Meta Ads",
caption="Ensure you have granted PostHog access to your Meta Ads account, learn how to do this in the [documentation](https://posthog.com/docs/cdp/sources/meta-ads).",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/mongodb/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/mongodb/source.py
index 96dbd7461d36..1658317bb7f8 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/mongodb/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/mongodb/source.py
@@ -258,6 +258,7 @@ class MongoDBSource(SimpleSource[MongoDBSourceConfig], ValidateDatabaseHostMixin
return SourceConfig(
name=SchemaExternalDataSourceType.MONGO_DB,
category=DataWarehouseSourceCategory.DATABASES,
+ featured=True,
keywords=["mongo"],
label="MongoDB",
caption="Enter your MongoDB connection string to automatically pull your MongoDB data into the PostHog Data warehouse.",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/mysql/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/mysql/source.py
index 3eef69293a7e..69571867c87b 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/mysql/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/mysql/source.py
@@ -88,6 +88,7 @@ class MySQLSource(SQLSource[MySQLSourceConfig], SSHTunnelMixin, ValidateDatabase
return SourceConfig(
name=SchemaExternalDataSourceType.MY_SQL,
category=DataWarehouseSourceCategory.DATABASES,
+ featured=True,
caption="Enter your MySQL/MariaDB credentials to automatically pull your MySQL data into the PostHog Data warehouse.",
iconPath="/static/services/mysql.png",
docsUrl="https://posthog.com/docs/cdp/sources/mysql",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/supabase/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/supabase/source.py
index ae038a4d9522..80569d1cc236 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/supabase/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/supabase/source.py
@@ -76,6 +76,7 @@ class SupabaseSource(PostgresSource):
return SourceConfig(
name=SchemaExternalDataSourceType.SUPABASE,
category=DataWarehouseSourceCategory.DATABASES,
+ featured=True,
iconPath="/static/services/supabase.png",
caption="Enter your Supabase credentials to automatically pull your data into the PostHog Data warehouse",
docsUrl="https://posthog.com/tutorials/supabase-query",