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): clarify that table prefix renames, not filters, imports (#76994)

posthog[bot]bac02dd0beb5
diff --git a/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx b/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx
index bc2b600a9d9a..78ca0169fa56 100644
--- a/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx
+++ b/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx
@@ -953,8 +953,8 @@ export function SourceFormComponent({
{showPrefix && !isDirectQuerySource && !customAiIntroActive && (
<LemonField
name="prefix"
- label="Table prefix (optional)"
- help="Use only letters, numbers, and underscores. Must start with a letter or underscore."
+ label="Table name prefix (optional)"
+ help="Renames the tables PostHog creates. It doesn't filter which tables get imported. Use only letters, numbers, and underscores, and start with a letter or underscore."
>
{({ value, onChange }) => {
const cleaned = value ? value.trim().replace(/^_+|_+$/g, '') : ''
diff --git a/products/warehouse_sources/backend/presentation/views/external_data_source.py b/products/warehouse_sources/backend/presentation/views/external_data_source.py
index f287559681c1..de704edcc84c 100644
--- a/products/warehouse_sources/backend/presentation/views/external_data_source.py
+++ b/products/warehouse_sources/backend/presentation/views/external_data_source.py
@@ -1318,7 +1318,11 @@ class ExternalDataSourceCreateSerializer(serializers.Serializer):
help_text="Connection credentials and a 'schemas' array. Keys depend on source_type.",
)
prefix = serializers.CharField(
- max_length=100, required=False, allow_null=True, allow_blank=True, help_text="Table name prefix in HogQL."
+ max_length=100,
+ required=False,
+ allow_null=True,
+ allow_blank=True,
+ help_text="Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported.",
)
description = serializers.CharField(
max_length=400, required=False, allow_null=True, allow_blank=True, help_text="Human-readable description."
@@ -1383,7 +1387,10 @@ class SourceSetupSerializer(serializers.Serializer):
required=False,
allow_null=True,
allow_blank=True,
- help_text="Table name prefix in HogQL, e.g. 'stripe' produces stripe_charges. Defaults to the source type.",
+ help_text=(
+ "Prefix added to the table names PostHog creates in HogQL, e.g. 'stripe' produces stripe_charges. "
+ "Does not filter which tables are imported. Defaults to the source type."
+ ),
)
description = serializers.CharField(
max_length=400, required=False, allow_null=True, allow_blank=True, help_text="Human-readable description."
diff --git a/products/warehouse_sources/frontend/generated/api.schemas.ts b/products/warehouse_sources/frontend/generated/api.schemas.ts
index b51dc28cdbf6..9db1caaf3d32 100644
--- a/products/warehouse_sources/frontend/generated/api.schemas.ts
+++ b/products/warehouse_sources/frontend/generated/api.schemas.ts
@@ -4415,7 +4415,7 @@ export interface ExternalDataSourceCreateApi {
/** Connection credentials and a 'schemas' array. Keys depend on source_type. */
payload: ExternalDataSourceCreateApiPayload
/**
- * Table name prefix in HogQL.
+ * Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported.
* @maxLength 100
* @nullable
*/
@@ -11198,7 +11198,7 @@ export interface SourceSetupApi {
/** Connection details as flat keys for the source_type (discover required fields with the wizard tool). Prefer references over raw secrets: pass {'credential_id': <id>} referencing the connection details the user stored via the connect-link page (discover ids with the stored_credentials endpoint) — they are merged in server-side and deleted once consumed. An already-connected OAuth integration can be passed via its id key instead (e.g. {'hubspot_integration_id': 123}). For source_type 'Custom' (a user-defined REST API) the keys are 'manifest_json' (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type the manifest declares — 'auth_token' (bearer), 'auth_api_key' (api_key), or 'auth_password' (http_basic); keep secrets in these auth_* keys, never inline in the manifest. A 'schemas' array is NOT required — all discovered tables are enabled automatically with sensible sync defaults. */
payload?: SourceSetupApiPayload
/**
- * Table name prefix in HogQL, e.g. 'stripe' produces stripe_charges. Defaults to the source type.
+ * Prefix added to the table names PostHog creates in HogQL, e.g. 'stripe' produces stripe_charges. Does not filter which tables are imported. Defaults to the source type.
* @maxLength 100
* @nullable
*/
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index a5b1458c4fdc..5b99f1ede4bc 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -32686,7 +32686,7 @@ export namespace Schemas {
/** Connection credentials and a 'schemas' array. Keys depend on source_type. */
payload: ExternalDataSourceCreatePayload;
/**
- * Table name prefix in HogQL.
+ * Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported.
* @maxLength 100
* @nullable
*/
@@ -70230,7 +70230,7 @@ export namespace Schemas {
/** Connection details as flat keys for the source_type (discover required fields with the wizard tool). Prefer references over raw secrets: pass {'credential_id': <id>} referencing the connection details the user stored via the connect-link page (discover ids with the stored_credentials endpoint) — they are merged in server-side and deleted once consumed. An already-connected OAuth integration can be passed via its id key instead (e.g. {'hubspot_integration_id': 123}). For source_type 'Custom' (a user-defined REST API) the keys are 'manifest_json' (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type the manifest declares — 'auth_token' (bearer), 'auth_api_key' (api_key), or 'auth_password' (http_basic); keep secrets in these auth_* keys, never inline in the manifest. A 'schemas' array is NOT required — all discovered tables are enabled automatically with sensible sync defaults. */
payload?: SourceSetupPayload;
/**
- * Table name prefix in HogQL, e.g. 'stripe' produces stripe_charges. Defaults to the source type.
+ * Prefix added to the table names PostHog creates in HogQL, e.g. 'stripe' produces stripe_charges. Does not filter which tables are imported. Defaults to the source type.
* @maxLength 100
* @nullable
*/
diff --git a/services/mcp/src/generated/warehouse_sources/api.ts b/services/mcp/src/generated/warehouse_sources/api.ts
index c3b86ab2e511..3957a7d7abdc 100644
--- a/services/mcp/src/generated/warehouse_sources/api.ts
+++ b/services/mcp/src/generated/warehouse_sources/api.ts
@@ -1814,7 +1814,13 @@ export const ExternalDataSourcesCreateBody = /* @__PURE__ */ zod.object({
payload: zod
.record(zod.string(), zod.unknown())
.describe("Connection credentials and a 'schemas' array. Keys depend on source_type."),
- prefix: zod.string().max(externalDataSourcesCreateBodyPrefixMax).nullish().describe('Table name prefix in HogQL.'),
+ prefix: zod
+ .string()
+ .max(externalDataSourcesCreateBodyPrefixMax)
+ .nullish()
+ .describe(
+ 'Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported.'
+ ),
description: zod
.string()
.max(externalDataSourcesCreateBodyDescriptionMax)
@@ -3645,7 +3651,9 @@ export const ExternalDataSourcesSetupCreateBody = /* @__PURE__ */ zod.object({
.string()
.max(externalDataSourcesSetupCreateBodyPrefixMax)
.nullish()
- .describe("Table name prefix in HogQL, e.g. 'stripe' produces stripe_charges. Defaults to the source type."),
+ .describe(
+ "Prefix added to the table names PostHog creates in HogQL, e.g. 'stripe' produces stripe_charges. Does not filter which tables are imported. Defaults to the source type."
+ ),
description: zod
.string()
.max(externalDataSourcesSetupCreateBodyDescriptionMax)
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/data-warehouse-source-setup.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/data-warehouse-source-setup.json
index 50ba55b63f53..2e3cbd985806 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/data-warehouse-source-setup.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/data-warehouse-source-setup.json
@@ -36,7 +36,7 @@
"type": "null"
}
],
- "description": "Table name prefix in HogQL, e.g. 'stripe' produces stripe_charges. Defaults to the source type."
+ "description": "Prefix added to the table names PostHog creates in HogQL, e.g. 'stripe' produces stripe_charges. Does not filter which tables are imported. Defaults to the source type."
},
"source_type": {
"description": "The source type name (e.g. \"Postgres\", \"MySQL\", \"Stripe\"). Use external-data-sources-wizard to see available types and their required fields.",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json
index 711b1ea94a4d..7a02788010e3 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json
@@ -42,7 +42,7 @@
"type": "null"
}
],
- "description": "Table name prefix in HogQL."
+ "description": "Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported."
},
"source_type": {
"description": "The source type name (e.g. \"Postgres\", \"MySQL\", \"Stripe\"). Use external-data-sources-wizard to see available types and their required fields.",