Skip to content

feat(data-warehouse): column selection on MySQL, MSSQL, BigQuery, Snowflake, Redshift#60155

Merged
danielcarletti merged 23 commits into
masterfrom
posthog-code/column-selection-all-db-sources-pr2
May 29, 2026
Merged

feat(data-warehouse): column selection on MySQL, MSSQL, BigQuery, Snowflake, Redshift#60155
danielcarletti merged 23 commits into
masterfrom
posthog-code/column-selection-all-db-sources-pr2

Conversation

@danielcarletti
Copy link
Copy Markdown
Contributor

🪜 Stacked on top of #60153 — review/merge that one first. Diff shown here is just the PR2 delta.

Problem

Postgres has had per-column sync selection for a while. Every other SQL source we ingest from — MySQL, MSSQL, BigQuery, Snowflake, Redshift — was hard-coded to SELECT *. That inflates sync cost on wide tables, leaks PII columns into HogQL, and trips up customers who want to exclude expensive blob/JSON columns from their warehouse.

PR1 hoisted the column-projection logic into shared SQL primitives. This PR flips the capability on for the five remaining SQL drivers and surfaces the picker in the warehouse-mode UI.

Changes

Per-driver _build_query + Arrow projection

Every driver now reads inputs.enabled_columns and threads it into the SQL builder. The Arrow schema fed to dlt is projected through project_arrow_columns (or each driver's hand-rolled equivalent) so cursor.description matches the projected SELECT.

Driver Approach
MySQL (mysql.py) _QUERY_BUILDER.select_all(..., enabled_columns=, primary_keys=) via BacktickIdentifierQuoter. Arrow schema projected via project_arrow_columns.
MSSQL (mssql.py) format_projected_select_clause(...) via BracketIdentifierQuoter. Same Arrow projection.
Redshift (redshift.py) _redshift_select_clause(...) wraps compute_projected_columns with psycopg.sql.Identifier(...) — keeps psycopg's escaping for parity with Postgres.
Snowflake (snowflake.py) Keeps the IDENTIFIER(%s) table-name wrapping; SELECT clause renders the explicit column list via AnsiIdentifierQuoter.
BigQuery (bigquery.py) Query path: temp table built from SELECT col1, col2 FROM … so it holds only the projection. Direct-storage-API path: ReadSession.TableReadOptions.selected_fields restricts the stream.

Each driver also sets supports_column_selection: bool = True on its SQLSource subclass — that flag flows out the API to the frontend.

API + persistence

  • Drops the if source_type_model == POSTGRES gate in external_data_source.py:1168 so every SQL source persists schema_metadata.columns on create. The column picker has available_columns to render immediately — no waiting for the first 6h refresh.
  • New _SQL_SOURCE_TYPES_WITH_COLUMN_SELECTION constant gates this and avoids isinstance(source, SQLSource) checks that tests' Mock(SourceRegistry.get_source) can't satisfy.
  • refresh_schemas also routes non-Postgres SQL sources through their SQLSource.reconcile_schema_metadata hook (Postgres keeps its direct call to reconcile_postgres_schemas for the direct-query DataWarehouseTable rebuild path).

Frontend

  • SchemaScene.showColumnsSection now reads source.supports_column_selection with a fallback to the legacy available_columns.length > 0 check. The picker surfaces even before the first refresh has populated columns — ColumnsSection itself shows a "no columns discovered yet" hint in that state.
  • No hardcoded source-type lists anywhere in TS — the whole gate is the single backend boolean.

Tests

Each driver gets a TestBuildQueryEnabledColumns class mirroring test_postgres.py:

  • NoneSELECT *
  • Subset → SELECT col, pk FROM … (PK retained)
  • Subset + incremental → SELECT col, pk, incremental_field FROM … with WHERE incremental_field > …
  • [] with no PK / incremental → falls back to SELECT *
  • [] with PK only → SELECT pk FROM …

Plus a BigQuery-specific _bq_select_clause parameterized test.

How did you test this code?

Agent-authored. I'm an AI agent; all testing below is automated.

Suite Result
All five drivers' test suites (mysql, mssql, bigquery, snowflake, redshift) + new projection cases 241 passed
Full posthog/temporal/data_imports/sources/ suite 2097 passed
ruff check + ruff format clean
hogli build:openapi no schema changes (PR1 added the field)

Not tested manually — the configuration UI loads behind a route, the SQL driver behavior requires real DB connections to verify end-to-end. The PR1 test plan listed the manual verifications a reviewer should run before merge — same plan applies here:

  1. Connect a MySQL source via the wizard. Pick a subset of columns on a table during creation. Confirm sync produces a DataWarehouseTable with only those columns + PKs.
  2. On the existing Postgres source, no regression (full set still syncs when picker untouched).
  3. Open the Configuration tab for a MySQL/Snowflake/BigQuery schema, deselect a column under Columns, save. Wait for next sync, confirm Delta + HogQL no longer expose that column.

Publish to changelog?

yes — "Per-column sync selection now works on MySQL, MSSQL, BigQuery, Snowflake, and Redshift (previously Postgres only). Cuts sync cost on wide tables and lets you exclude columns from HogQL."

Docs update

Skip — column-selection docs already cover the Postgres case; updating to drop the "Postgres only" caveat is a docs-only follow-up.

🤖 Agent context

Authored by PostHog Code (Claude Opus 4.7), second of two PRs stacked on the user-approved plan at claude/plans/1-about-stuff-like-lovely-sundae.md.

Key decisions:

  • _SQL_SOURCE_TYPES_WITH_COLUMN_SELECTION is a literal set, not isinstance(source, SQLSource) — every test in test_external_data_source.py mocks SourceRegistry.get_source, so an isinstance check would always be False in tests. The set duplicates the supports_column_selection = True attribute on each driver class, which is a minor maintenance cost; the alternative (rewriting ~10 test mocks to use spec=PostgresSource) is worse.
  • BigQuery's two read paths: the incremental + view paths already create a temp table via bq_client.query(...), so projecting at the query level is enough — the Storage API session reads from the projected temp table. For the direct-table read path, TableReadOptions.selected_fields is the only knob that restricts the stream.
  • Snowflake keeps IDENTIFIER(%s) for the table name but projects the SELECT clause inline via AnsiIdentifierQuoter. Snowflake doesn't accept identifier-bind for column lists, so this is necessary.
  • Frontend uses ?? for backward compat: if an old API client doesn't return supports_column_selection, we fall back to the legacy available_columns.length > 0 check rather than hiding the picker. Avoids a flicker for sessions that span a deploy.

Created with PostHog Code

Hoists the column-projection logic (`build_select_clause`,
`filter_columns_by_enabled_columns`, `filter_dwh_columns_by_enabled_columns`,
`postgres_schema_metadata`) from Postgres-specific helpers into
`posthog/temporal/data_imports/sources/common/sql/{projection,metadata}.py`.
Every SQL source can now reuse them.

Adds the `SQLSource.supports_column_selection` capability flag (Postgres
flips to `True`; every other SQL source stays `False` until PR2 enables
their `enabled_columns` plumbing), exposes it on `ExternalDataSourceSerializer`
so the frontend can gate the picker without a hardcoded source-type list,
and threads `enabled_columns` through `SourceInputs` so a single place
populates it for every SQL driver.

Also extends `SelectQueryBuilder.select_all` with `enabled_columns` /
`primary_keys` so MySQL/MSSQL/Snowflake/Redshift/BigQuery pick up
column projection for free in PR2, and adds a generic
`SQLSource.reconcile_schema_metadata` hook + a `prune_enabled_columns`
pass so a source-side column drop can't break the next sync.

No user-visible behavior change in this PR — Postgres is still the only
source with `supports_column_selection=True`. PR2 broadens to MySQL,
MSSQL, BigQuery, Snowflake, Redshift and lands the warehouse-mode UI.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@assign-reviewers-posthog assign-reviewers-posthog Bot requested review from a team May 26, 2026 21:04
@danielcarletti danielcarletti marked this pull request as draft May 26, 2026 21:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Size Change: 0 B

Total Size: 80.7 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist-report/decompression-worker/src/scenes/session-recordings/player/snapshot-processing/decompressionWorker 2.85 kB 0 B
frontend/dist-report/exporter/_chunks/chunk 8.41 MB 0 B
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Action 24.9 kB 0 B
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Actions 1.3 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityScene 118 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 16.8 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 130 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityUsers 838 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.7 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 55 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 20.9 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 3.6 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 59.8 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 28.1 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 881 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 5.16 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.7 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 29.1 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 4.79 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/skills/LLMSkillScene 895 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/skills/LLMSkillsScene 912 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 27.3 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 7.27 kB 0 B
frontend/dist-report/exporter/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 19 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.64 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 3.02 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 1.02 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 1.78 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 33.9 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.04 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 39.2 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 2.61 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 2.15 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 7.83 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/DataWarehouseScene 46.8 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 1.08 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 24.4 kB +331 B (+1.38%)
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 1.03 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 6.27 kB 0 B
frontend/dist-report/exporter/_parent/products/deployments/frontend/Deployment 4.02 kB 0 B
frontend/dist-report/exporter/_parent/products/deployments/frontend/DeploymentProject 5.54 kB 0 B
frontend/dist-report/exporter/_parent/products/deployments/frontend/Deployments 9.28 kB 0 B
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeature 991 B 0 B
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.21 kB 0 B
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointScene 40.6 kB 0 B
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointsScene 24.5 kB 0 B
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.37 kB 0 B
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 104 kB 0 B
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 27.1 kB 0 B
frontend/dist-report/exporter/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 7.35 kB 0 B
frontend/dist-report/exporter/_parent/products/games/368Hedgehogs/368Hedgehogs 5.58 kB 0 B
frontend/dist-report/exporter/_parent/products/games/FlappyHog/FlappyHog 6.09 kB 0 B
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 59.7 kB 0 B
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 5.28 kB 0 B
frontend/dist-report/exporter/_parent/products/links/frontend/LinkScene 25.2 kB 0 B
frontend/dist-report/exporter/_parent/products/links/frontend/LinksScene 4.51 kB 0 B
frontend/dist-report/exporter/_parent/products/live_debugger/frontend/LiveDebugger 19.4 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/LogsScene 17.8 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 17.3 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 5.27 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 2.22 kB 0 B
frontend/dist-report/exporter/_parent/products/managed_migrations/frontend/ManagedMigration 14.9 kB 0 B
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 40.5 kB 0 B
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 18.5 kB 0 B
frontend/dist-report/exporter/_parent/products/metrics/frontend/MetricsScene 13.1 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/StickinessBarChart/StickinessBarChart 3.27 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/StickinessLineChart/StickinessLineChart 3.11 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 7.12 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 4.21 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 4.57 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 4.31 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/observations/ReplayObservation 8.13 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 32.8 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 11.5 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ScannerTemplatesScene 4.56 kB 0 B
frontend/dist-report/exporter/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 26.5 kB 0 B
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.02 kB 0 B
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 19.2 kB 0 B
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskDetailScene 23.5 kB 0 B
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskTracker 14.6 kB 0 B
frontend/dist-report/exporter/_parent/products/tracing/frontend/TracingScene 54.4 kB 0 B
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterview 9.28 kB 0 B
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviewResponse 5.64 kB 0 B
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviews 6.04 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 2.52 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 44.6 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 7.29 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.1 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 13.9 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.5 kB 0 B
frontend/dist-report/exporter/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 16.6 kB 0 B
frontend/dist-report/exporter/_parent/products/workflows/frontend/Workflows/WorkflowScene 111 kB 0 B
frontend/dist-report/exporter/_parent/products/workflows/frontend/WorkflowsScene 60.1 kB 0 B
frontend/dist-report/exporter/src/exporter/exporter 19.6 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterDashboardScene 1.99 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterHeatmapScene 19.6 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterInsightScene 2.98 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterInterviewScene 310 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterNotebookScene 2.71 MB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterRecordingScene 1.1 kB 0 B
frontend/dist-report/exporter/src/exporterSharedChunkAnchors 1.19 kB 0 B
frontend/dist-report/exporter/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 11.3 kB 0 B
frontend/dist-report/exporter/src/lib/components/MonacoDiffEditor 471 B 0 B
frontend/dist-report/exporter/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2.22 kB 0 B
frontend/dist-report/exporter/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 808 B 0 B
frontend/dist-report/exporter/src/lib/lemon-ui/Link/Link 359 B 0 B
frontend/dist-report/exporter/src/lib/monaco/CodeEditorInline 798 B 0 B
frontend/dist-report/exporter/src/lib/monaco/vimMode 211 kB 0 B
frontend/dist-report/exporter/src/lib/ui/Button/ButtonPrimitives 422 B 0 B
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitals 7.48 kB 0 B
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.05 kB 0 B
frontend/dist-report/exporter/src/queries/schema 840 kB +287 B (+0.03%)
frontend/dist-report/exporter/src/scenes/approvals/changeRequestsLogic 850 B 0 B
frontend/dist-report/exporter/src/scenes/authentication/passkeyLogic 790 B 0 B
frontend/dist-report/exporter/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.2 kB 0 B
frontend/dist-report/exporter/src/scenes/data-pipelines/TransformationsScene 6.51 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/BoxPlot/BoxPlot 5.35 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 8.81 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/RegionMap/RegionMap 29.7 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/WorldMap/WorldMap 1.04 MB 0 B
frontend/dist-report/exporter/src/scenes/models/ModelsScene 19 kB 0 B
frontend/dist-report/exporter/src/scenes/models/NodeDetailScene 17 kB 0 B
frontend/dist-report/monaco-editor-worker/src/lib/monaco/workers/monacoEditorWorker 288 kB 0 B
frontend/dist-report/monaco-json-worker/src/lib/monaco/workers/monacoJsonWorker 419 kB 0 B
frontend/dist-report/monaco-typescript-worker/src/lib/monaco/workers/monacoTsWorker 7.02 MB 0 B
frontend/dist-report/posthog-app/_chunks/chunk 8.61 MB 0 B
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Action 25.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Actions 1.36 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityScene 119 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 16.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 130 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityUsers 872 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 55.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 21 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 3.64 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 59.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 28.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 915 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 5.19 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 29.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 4.83 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/skills/LLMSkillScene 929 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/skills/LLMSkillsScene 946 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 27.4 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 7.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 19 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.67 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 3.06 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 1.06 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 1.82 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 26.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.07 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 38 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 2.65 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 2.18 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 7.86 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/DataWarehouseScene 1.78 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 1.15 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 24.4 kB +331 B (+1.38%)
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 1.06 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 6.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/deployments/frontend/Deployment 4.05 kB 0 B
frontend/dist-report/posthog-app/_parent/products/deployments/frontend/DeploymentProject 5.58 kB 0 B
frontend/dist-report/posthog-app/_parent/products/deployments/frontend/Deployments 9.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeature 1.16 kB 0 B
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.24 kB 0 B
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointScene 40.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointsScene 22.4 kB 0 B
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.44 kB 0 B
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 103 kB 0 B
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 27.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 7.38 kB 0 B
frontend/dist-report/posthog-app/_parent/products/games/368Hedgehogs/368Hedgehogs 5.61 kB 0 B
frontend/dist-report/posthog-app/_parent/products/games/FlappyHog/FlappyHog 6.12 kB 0 B
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 59.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 5.32 kB 0 B
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinkScene 25.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinksScene 4.55 kB 0 B
frontend/dist-report/posthog-app/_parent/products/live_debugger/frontend/LiveDebugger 19.5 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/LogsScene 17.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 17.3 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 5.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 2.26 kB 0 B
frontend/dist-report/posthog-app/_parent/products/managed_migrations/frontend/ManagedMigration 14.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 40.5 kB 0 B
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 18.5 kB 0 B
frontend/dist-report/posthog-app/_parent/products/metrics/frontend/MetricsScene 13.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/StickinessBarChart/StickinessBarChart 3.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/StickinessLineChart/StickinessLineChart 3.14 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 7.15 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 4.24 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 4.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 4.35 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/observations/ReplayObservation 8.17 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 32.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 11.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ScannerTemplatesScene 4.59 kB 0 B
frontend/dist-report/posthog-app/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 26.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.05 kB 0 B
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 19.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskDetailScene 23.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskTracker 14.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/tracing/frontend/TracingScene 54.4 kB 0 B
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterview 9.32 kB 0 B
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviewResponse 5.68 kB 0 B
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviews 6.08 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 2.56 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 44.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 7.32 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 13.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 16.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/Workflows/WorkflowScene 104 kB 0 B
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/WorkflowsScene 60.2 kB 0 B
frontend/dist-report/posthog-app/src/index 61.1 kB 0 B
frontend/dist-report/posthog-app/src/layout/panel-layout/ai-first/tabs/NavTabChat 7.16 kB 0 B
frontend/dist-report/posthog-app/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 11.3 kB 0 B
frontend/dist-report/posthog-app/src/lib/components/MonacoDiffEditor 471 B 0 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2.25 kB 0 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 842 B 0 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/Link/Link 359 B 0 B
frontend/dist-report/posthog-app/src/lib/monaco/CodeEditorInline 832 B 0 B
frontend/dist-report/posthog-app/src/lib/monaco/vimMode 211 kB 0 B
frontend/dist-report/posthog-app/src/lib/ui/Button/ButtonPrimitives 426 B 0 B
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitals 7.52 kB 0 B
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.09 kB 0 B
frontend/dist-report/posthog-app/src/queries/schema 840 kB +287 B (+0.03%)
frontend/dist-report/posthog-app/src/scenes/activity/explore/EventsScene 3.28 kB 0 B
frontend/dist-report/posthog-app/src/scenes/activity/explore/SessionsScene 4.69 kB 0 B
frontend/dist-report/posthog-app/src/scenes/activity/live/LiveEventsTable 5.58 kB 0 B
frontend/dist-report/posthog-app/src/scenes/agentic/AgenticAuthorize 5.84 kB 0 B
frontend/dist-report/posthog-app/src/scenes/approvals/ApprovalDetail 16.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/approvals/changeRequestsLogic 884 B 0 B
frontend/dist-report/posthog-app/src/scenes/audit-logs/AdvancedActivityLogsScene 42.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/AuthenticatedShell 165 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/AccountConnected 3.33 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/AgenticAccountMismatch 2.73 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/CLIAuthorize 11.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/CLILive 4.37 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/credential-review/CredentialReview 3.95 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/EmailMFAVerify 3.37 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/InviteSignup 15.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/Login 10.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/Login2FA 5.08 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/passkeyLogic 824 B 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/PasswordReset 4.71 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/PasswordResetComplete 3.34 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/signup/SignupContainer 28.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/signup/verify-email/VerifyEmail 5.13 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/TwoFactorReset 4.37 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/VercelConnect 5.33 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/VercelLinkError 2.61 kB 0 B
frontend/dist-report/posthog-app/src/scenes/billing/AuthorizationStatus 1.07 kB 0 B
frontend/dist-report/posthog-app/src/scenes/billing/Billing 833 B 0 B
frontend/dist-report/posthog-app/src/scenes/billing/BillingSection 21.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohort 28.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/cohorts/CohortCalculationHistory 6.58 kB 0 B
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohorts 9.78 kB 0 B
frontend/dist-report/posthog-app/src/scenes/coupons/Coupons 1.06 kB 0 B
frontend/dist-report/posthog-app/src/scenes/dashboard/Dashboard 1.65 kB 0 B
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/Dashboards 19.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/templates/DashboardTemplateCopyScene 6.06 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/DataManagementScene 986 B 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionEdit 17.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionView 24.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/MaterializedColumns/MaterializedColumns 12 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/variables/SqlVariableEditScene 7.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/batch-exports/BatchExportScene 61 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DataPipelinesNewScene 2.66 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DestinationsScene 3.03 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/legacy-plugins/LegacyPluginScene 21 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/TransformationsScene 2.27 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/WebScriptsScene 2.89 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-warehouse/DataWarehouseScene 1.72 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-warehouse/editor/EditorScene 1.48 kB 0 B
frontend/dist-report/posthog-app/src/scenes/debug/DebugScene 20.3 kB 0 B
frontend/dist-report/posthog-app/src/scenes/debug/hog/HogRepl 7.72 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/Experiment 207 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/Experiments 20.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetric 6.41 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetrics 889 B 0 B
frontend/dist-report/posthog-app/src/scenes/exports/ExportsScene 4.33 kB 0 B
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlag 146 kB 0 B
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlags 1.08 kB 0 B
frontend/dist-report/posthog-app/src/scenes/groups/Group 15.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/groups/Groups 4.26 kB 0 B
frontend/dist-report/posthog-app/src/scenes/groups/GroupsNew 7.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health-alerts/HealthAlertsScene 4.14 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health/categoryDetail/HealthCategoryDetailScene 7.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health/HealthScene 12.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health/pipelineStatus/PipelineStatusScene 11.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapNewScene 5.38 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapRecordingScene 4.27 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapScene 6.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmaps/HeatmapsScene 4.23 kB 0 B
frontend/dist-report/posthog-app/src/scenes/hog-functions/HogFunctionScene 59.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/inbox/InboxScene 63.3 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/InsightQuickStart/InsightQuickStart 5.77 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/InsightScene 34.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/BoxPlot/BoxPlot 5.39 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 4.84 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/RegionMap/RegionMap 29.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/WorldMap/WorldMap 5.13 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/AsyncMigrations/AsyncMigrations 13.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/DeadLetterQueue/DeadLetterQueue 5.74 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/QueryPerformance/QueryPerformance 8.97 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/SystemStatus/SystemStatus 17.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/IntegrationsRedirect/IntegrationsRedirect 1.08 kB 0 B
frontend/dist-report/posthog-app/src/scenes/marketing-analytics/MarketingAnalyticsScene 42 kB 0 B
frontend/dist-report/posthog-app/src/scenes/max/Max 1.02 kB 0 B
frontend/dist-report/posthog-app/src/scenes/models/ModelsScene 19 kB 0 B
frontend/dist-report/posthog-app/src/scenes/models/NodeDetailScene 17.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/moveToPostHogCloud/MoveToPostHogCloud 4.81 kB 0 B
frontend/dist-report/posthog-app/src/scenes/new-tab/NewTabScene 1.82 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookCanvasScene 3.89 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookPanel/NotebookPanel 5.94 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookScene 9.26 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebooksScene 7.95 kB 0 B
frontend/dist-report/posthog-app/src/scenes/oauth/OAuthAuthorize 980 B 0 B
frontend/dist-report/posthog-app/src/scenes/onboarding/coupon/OnboardingCouponRedemption 1.55 kB 0 B
frontend/dist-report/posthog-app/src/scenes/onboarding/Onboarding 791 kB 0 B
frontend/dist-report/posthog-app/src/scenes/onboarding/sdks/SdkDoctorScene 10.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/ConfirmOrganization/ConfirmOrganization 4.88 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/Create/Create 1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/Deactivated 1.48 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/PendingDeletion 2.45 kB 0 B
frontend/dist-report/posthog-app/src/scenes/persons/PersonScene 19 kB 0 B
frontend/dist-report/posthog-app/src/scenes/persons/PersonsScene 6.09 kB 0 B
frontend/dist-report/posthog-app/src/scenes/PreflightCheck/PreflightCheck 5.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTour 275 kB 0 B
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTours 5.03 kB 0 B
frontend/dist-report/posthog-app/src/scenes/project-homepage/ProjectHomepage 18.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/project/Create/Create 1.18 kB 0 B
frontend/dist-report/posthog-app/src/scenes/resource-transfer/ResourceTransfer 9.53 kB 0 B
frontend/dist-report/posthog-app/src/scenes/saved-insights/SavedInsights 1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/detail/SessionRecordingDetail 2.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/file-playback/SessionRecordingFilePlaybackScene 4.82 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/kiosk/SessionRecordingsKiosk 10.3 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/player/snapshot-processing/DecompressionWorkerManager 329 B 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene 5.45 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/SessionRecordings 1.12 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/settings/SessionRecordingsSettingsScene 2.31 kB 0 B
frontend/dist-report/posthog-app/src/scenes/sessions/SessionProfileScene 15.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/settings/SettingsScene 3.9 kB 0 B
frontend/dist-report/posthog-app/src/scenes/sites/Site 1.53 kB 0 B
frontend/dist-report/posthog-app/src/scenes/startups/StartupProgram 21.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/StripeConfirmInstall/StripeConfirmInstall 3.88 kB 0 B
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionScene 14.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionsScene 5.53 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/forms/SurveyFormBuilder 1.89 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/Survey 1.36 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/Surveys 26.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/wizard/SurveyWizard 72.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/themes/CustomCssScene 3.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/toolbar-launch/ToolbarLaunch 2.82 kB 0 B
frontend/dist-report/posthog-app/src/scenes/Unsubscribe/Unsubscribe 2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene 6.97 kB 0 B
frontend/dist-report/posthog-app/src/scenes/web-analytics/WebAnalyticsScene 10.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/wizard/Wizard 4.8 kB 0 B
frontend/dist-report/posthog-app/src/sharedChunkAnchors 1.19 kB 0 B
frontend/dist-report/render-query/src/render-query/render-query 27.4 MB +287 B (0%)
frontend/dist-report/toolbar/src/toolbar/toolbar 15.7 MB 0 B

compressed-size-action

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 26, 2026

Comments Outside Diff (2)

  1. posthog/temporal/data_imports/sources/mysql/mysql.py, line 433-456 (link)

    P2 Duplicate logic across three drivers — OnceAndOnlyOnce

    _retained_column_names in mysql.py, the identically-named function in mssql.py, and _retained_redshift_column_names in redshift.py are all the same logic. The common module already provides both pieces needed: compute_projected_columns (computes the retained set + user order) and project_arrow_columns (filters a Table in source order using that result as a set). Since project_arrow_columns converts the input list to a set internally and then re-orders by table.columns, the two-step call compute_projected_columns → project_arrow_columns already preserves source order and handles all the edge cases. All three private helpers can be deleted and their call sites replaced with the two-liner that already exists in the common module.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: posthog/temporal/data_imports/sources/mysql/mysql.py
    Line: 433-456
    
    Comment:
    **Duplicate logic across three drivers — OnceAndOnlyOnce**
    
    `_retained_column_names` in `mysql.py`, the identically-named function in `mssql.py`, and `_retained_redshift_column_names` in `redshift.py` are all the same logic. The common module already provides both pieces needed: `compute_projected_columns` (computes the retained set + user order) and `project_arrow_columns` (filters a `Table` in source order using that result as a set). Since `project_arrow_columns` converts the input list to a `set` internally and then re-orders by `table.columns`, the two-step call `compute_projected_columns → project_arrow_columns` already preserves source order and handles all the edge cases. All three private helpers can be deleted and their call sites replaced with the two-liner that already exists in the common module.
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. posthog/temporal/data_imports/sources/redshift/redshift.py, line 879-886 (link)

    P2 The has_duplicate_primary_keys guard now fires whenever primary_keys == ["id"], which includes tables where get_primary_keys_for_table genuinely returned ["id"] as the declared PK — not just the fallback path. The original code only ran the check in the fallback case. The comment "Re-checked here only when we fell back…" is therefore inaccurate. Every Redshift table whose real PK is named id now pays an extra has_duplicate_primary_keys query per sync that it didn’t before.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: posthog/temporal/data_imports/sources/redshift/redshift.py
    Line: 879-886
    
    Comment:
    The `has_duplicate_primary_keys` guard now fires whenever `primary_keys == ["id"]`, which includes tables where `get_primary_keys_for_table` genuinely returned `["id"]` as the declared PK — not just the fallback path. The original code only ran the check in the fallback case. The comment "Re-checked here only when we fell back…" is therefore inaccurate. Every Redshift table whose real PK is named `id` now pays an extra `has_duplicate_primary_keys` query per sync that it didn’t before.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
posthog/temporal/data_imports/sources/mysql/mysql.py:433-456
**Duplicate logic across three drivers — OnceAndOnlyOnce**

`_retained_column_names` in `mysql.py`, the identically-named function in `mssql.py`, and `_retained_redshift_column_names` in `redshift.py` are all the same logic. The common module already provides both pieces needed: `compute_projected_columns` (computes the retained set + user order) and `project_arrow_columns` (filters a `Table` in source order using that result as a set). Since `project_arrow_columns` converts the input list to a `set` internally and then re-orders by `table.columns`, the two-step call `compute_projected_columns → project_arrow_columns` already preserves source order and handles all the edge cases. All three private helpers can be deleted and their call sites replaced with the two-liner that already exists in the common module.

### Issue 2 of 3
posthog/temporal/data_imports/sources/redshift/redshift.py:879-886
The `has_duplicate_primary_keys` guard now fires whenever `primary_keys == ["id"]`, which includes tables where `get_primary_keys_for_table` genuinely returned `["id"]` as the declared PK — not just the fallback path. The original code only ran the check in the fallback case. The comment "Re-checked here only when we fell back…" is therefore inaccurate. Every Redshift table whose real PK is named `id` now pays an extra `has_duplicate_primary_keys` query per sync that it didn’t before.

### Issue 3 of 3
posthog/temporal/data_imports/sources/mysql/tests/test_mysql.py:7
The new `TestBuildQueryEnabledColumns` class uses `@parameterized.expand` from the third-party `parameterized` library — the only use of that library in `test_mysql.py` — while every other driver test added in this PR (MSSQL, Redshift, Snowflake) uses native `@pytest.mark.parametrize`. Prefer the native form to remove the extra import and keep the style uniform.

Reviews (1): Last reviewed commit: "feat(data-warehouse): enable column sele..." | Re-trigger Greptile

Comment thread posthog/temporal/data_imports/sources/mysql/tests/test_mysql.py Outdated
projected = compute_projected_columns(enabled_columns, primary_keys, incremental_field)
if projected is None:
return "*"
return ", ".join(f"`{column}`" for column in projected)
Copy link
Copy Markdown

@hex-security-app hex-security-app Bot May 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 BigQuery SQL injection via unvalidated column names in _bq_select_clause

_bq_select_clause (bigquery.py line 387) embeds column names directly with f"`{column}`" — it is the only driver that bypasses IdentifierQuoter._validate_identifier(). Every other driver routes through format_projected_select_clause(projected, quoter) which calls _validate_identifier and raises InvalidIdentifierError for any character outside the allowlist (so backtick, semicolon, space, etc. are rejected for MySQL/MSSQL/Snowflake; psycopg escaping handles Redshift).

The API-layer guard in ExternalDataSchemaSerializer.update() only rejects unknown column names if known: — i.e., only when schema_metadata.columns is already populated. For legacy BigQuery sources that have never been refreshed (or any source where schema_metadata is null), arbitrary strings can be stored as enabled_columns.

A team member with write access to warehouse schema configuration can then set enabled_columns to a value containing a backtick (e.g. col1\, (SELECT secret FROM `proj.ds`.`t` LIMIT 1) --) on such a source, trigger an incremental sync (or a VIEW/MATERIALIZED_VIEW sync), and the injected subquery executes against the BigQuery project under the stored service-account credentials. The incremental path goes through _get_query()_bq_select_clause()and the result is fed directly tobq_client.query()`. Impact is scoped to tables accessible to the service-account key (attacker's own organization's GCP project), but can expose columns/tables beyond what column selection was intended to restrict.

Prompt To Fix With AI
Replace the raw f-string backtick wrapping in `_bq_select_clause` with `format_projected_select_clause` using a `BacktickIdentifierQuoter` (or a new `BigQueryIdentifierQuoter` that uses backticks), matching exactly what MySQL does. This ensures `_validate_identifier` rejects any column name that contains a backtick or other disallowed character before it reaches the SQL string.

Concrete change in `bigquery.py`:

1. Import `BacktickIdentifierQuoter` and `format_projected_select_clause` from `posthog.temporal.data_imports.sources.common.sql`.
2. Add a module-level quoter: `_BQ_IDENTIFIER_QUOTER = BacktickIdentifierQuoter()`
3. Replace `_bq_select_clause`:
```python
def _bq_select_clause(
    enabled_columns: list[str] | None,
    primary_keys: list[str] | None,
    incremental_field: str | None,
) -> str:
    projected = compute_projected_columns(enabled_columns, primary_keys, incremental_field)
    return format_projected_select_clause(projected, _BQ_IDENTIFIER_QUOTER)
```
This is a one-line change to the return and makes BigQuery consistent with all other drivers.

Severity: medium | Confidence: 65%

Fixed in 5ac3078f.

…factor

Two cleanups from Greptile review on #60153:

1. `compute_projected_columns` had redundant `column in retained` guards in
   each iteration. Since `retained` was built from `enabled_columns +
   primary_keys + incremental_field`, every iterated element was guaranteed
   to be in `retained`. Drop the set and rely on `seen` for dedup.

2. Add tests for `project_arrow_columns`: `retained=None` pass-through,
   normal subset, source-order preservation, all-missing fallback, partial
   overlap. The silent fallback when no columns match could otherwise mask
   a driver passing the wrong column list in PR2.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@danielcarletti danielcarletti force-pushed the posthog-code/column-selection-all-db-sources-pr2 branch from dacd58a to 93114cc Compare May 26, 2026 21:12
Comment thread posthog/temporal/data_imports/sources/bigquery/bigquery.py Outdated
@veria-ai
Copy link
Copy Markdown

veria-ai Bot commented May 26, 2026

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented May 26, 2026

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

danielcarletti and others added 3 commits May 27, 2026 15:52
Drop self-explanatory comments, history references, and PR-specific
prose. Shorten docstrings to one line where the function name plus the
module docstring already cover the semantics.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@danielcarletti danielcarletti force-pushed the posthog-code/column-selection-all-db-sources-pr2 branch from 8b0f5be to 097150e Compare May 27, 2026 20:45
…line imports

The Postgres `build_select_clause` helper was a 4-line wrapper around
`compute_projected_columns` plus a `psycopg.sql.Identifier` wrap. Inline
at the two call sites (`postgres.py`, `partitioned_tables.py`) and delete
the file.

Move four inline imports to module top — `reconcile_postgres_schemas` in
the API + `PostgresSource`, and `ExternalDataSchema` in
`SQLSource.reconcile_schema_metadata`.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…ry, Snowflake, Redshift

Builds on PR #60153. Flips `supports_column_selection=True` on the five
remaining SQL drivers, threading `enabled_columns` from `SourceInputs`
through each driver's `_build_query` and Arrow-schema projection so the
SELECT clause and the streaming reader's row shape stay in lock-step.

Drivers:

- **MySQL / MSSQL / Redshift**: project via `compute_projected_columns`
  + each driver's existing identifier quoter (`BacktickIdentifierQuoter`,
  `BracketIdentifierQuoter`, psycopg `sql.Identifier`). Arrow schema is
  filtered through `project_arrow_columns` so `cursor.description`
  matches the projected SELECT.
- **Snowflake**: hand-rolled `_build_query` keeps the `IDENTIFIER(%s)`
  table-name wrapping, but the SELECT clause now renders the explicit
  column list via `AnsiIdentifierQuoter` when projection is active.
- **BigQuery**: rewrites `_get_query` to honor `enabled_columns`. On the
  direct-storage-API path (non-incremental tables), the
  `ReadSession.TableReadOptions.selected_fields` field restricts the
  stream to the projected columns; on the query path
  (incremental + view/materialized_view), the destination temp table
  already holds only the projected columns.

API + frontend:

- Drops the POSTGRES gate at `external_data_source.py:1168` so every
  SQL source persists `schema_metadata.columns` on create — the column
  picker has `available_columns` to render immediately. Non-Postgres
  SQL sources also route through `SQLSource.reconcile_schema_metadata`
  on `refresh_schemas` so the metadata stays current.
- `SchemaScene.showColumnsSection` now reads `source.supports_column_selection`
  with a fallback to the legacy `available_columns.length > 0` check —
  picker surfaces even before the first refresh has populated columns.

Per-driver tests added under `tests/test_<driver>.py::TestBuildQueryEnabledColumns`
mirroring the existing Postgres projection test cases.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@danielcarletti danielcarletti force-pushed the posthog-code/column-selection-all-db-sources-pr2 branch from 6736fad to 2da241e Compare May 27, 2026 20:54
Base automatically changed from posthog-code/column-selection-all-db-sources-pr1 to master May 28, 2026 15:22
…-selection-all-db-sources-pr2

# Conflicts:
#	products/data_warehouse/backend/api/external_data_source.py
…er available_columns across sql sources

Hoist the "Columns" button + `ColumnSelectionModal` from `DirectQuerySchemasTab`
into `ManagedSchemasTab`, gated on `source.supports_column_selection` (no
source-type list in TS). Adds parameterized API tests covering
`available_columns` + `supports_column_selection` for every SQL source so
the serializer's source-type-agnostic behavior is locked in.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…river retained-column helpers

Routes BigQuery's `_bq_select_clause` through `format_projected_select_clause`
+ `BacktickIdentifierQuoter` so user-controlled `enabled_columns` go through
the same allowlist check every other SQL driver uses. Without this, a column
name like `` `x` FROM `other.dataset.private` -- `` would inject into the
SELECT list (Veria HIGH / Hex MEDIUM).

Also removes the three near-identical `_retained_column_names` helpers from
MySQL / MSSQL / Redshift in favor of the existing `compute_projected_columns`
+ `project_arrow_columns` chain in `common/sql/projection.py` — same source-
order behavior, one less code path to keep in sync.

Migrates the MySQL `TestBuildQueryEnabledColumns` test off `parameterized` to
native `pytest.mark.parametrize` for style consistency with the rest of the
driver tests added in this PR.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…ection

`SchemaForm` only checked `!isDirectQueryMode`, so the column picker was
shown for every non-direct-query SQL source — including ones whose driver
silently ignores `enabled_columns` at sync time. Adds a `supportsColumnSelection`
flag to `SourceConfig` (sourced from `SQLSource.supports_column_selection`),
piped through both `wizard` and `public_source_configs` endpoints, and gates
the picker on it in the wizard.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
The original gating used `a ?? (b > 0)`, which is correct but depends on
JavaScript operator precedence reading. Split into two named locals so the
intent — "show if the source advertises column selection OR available
columns are already populated" — is obvious and survives future edits.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented May 28, 2026

⏭️ Skipped snapshot commit because branch advanced to 0a05f11 while workflow was testing 73bf735.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

…as tab

The per-schema configuration page already exposes column selection through
the dedicated "Columns" section in the sidebar, so the per-row button next
to "Configure" was just a second entry point to the same flow.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…ll new schemas" button

When a schema row has no `available_columns` (e.g. a source created before
PR2's `reconcile_schema_metadata` ran), the columns section showed a dead
end. Mirrors the column-picker modal's empty-state copy and routes through
the existing `refreshSchemas` action so the user can fix it from the same
page instead of bouncing back to the Schemas tab.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…g master merge

The merge from master into this branch (522b7ca) had a conflict in
external_data_source.py that I resolved without preserving the new CDC
safety checks master had added in parallel. Two validations and their
regression tests were silently dropped:

- Refuse per-schema `sync_type=cdc` when source-level CDC is off — prevents
  saving schemas that would never get a replication slot.
- Refuse CDC tables with no primary key — prevents creating replication
  state on the customer source for a config we'd reject downstream.

`_setup_cdc_slot` also runs after PK validation again, restoring the
ordering invariant ("don't leave replication state on the source for a
config we're about to refuse"). Both regression tests are back too.

No interaction with PR2's column-selection changes — the dropped block
was unrelated production code that the merge swallowed.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@danielcarletti danielcarletti marked this pull request as ready for review May 28, 2026 19:48
…sfy mypy

`get_postgres_source_table_location` returns `tuple[str | None, str, str]`,
so mypy inferred `resolved_source_schema` / `resolved_source_table_name`
as `str` from the if-branch and rejected the `else` branch's `... if X else None`
assignments. `sql_schema_metadata` already accepts `str | None`, so widen
the variable annotations to match.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
table=bq_table.to_bqstorage(),
data_format=bigquery_storage.DataFormat.ARROW,
read_options=bigquery_storage.ReadSession.TableReadOptions(
selected_fields=storage_selected_fields or [],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical bug: selected_fields=storage_selected_fields or [] will pass an empty list to BigQuery when storage_selected_fields is None, causing BigQuery to select zero columns instead of all columns.

When doing a full-refresh sync (not incremental) with no column projection (SELECT *), storage_selected_fields remains None (initialized line 732, only set in lines 784-785). The or [] fallback converts this to an empty list, which BigQuery interprets as "select no fields".

Fix:

read_options=bigquery_storage.ReadSession.TableReadOptions(
    selected_fields=storage_selected_fields,  # Remove the `or []`
    arrow_serialization_options=...
)

BigQuery's API treats None/absent as "all fields" but an empty list as "no fields".

Suggested change
selected_fields=storage_selected_fields or [],
selected_fields=storage_selected_fields,

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False positive — for BigQuery Storage API TableReadOptions.selected_fields (a repeated string proto field), an empty list is the documented signal for "read all fields", not zero. Per the BQ Storage API docs: "Names of the fields in the table that should be read. If empty, all fields will be read."

So storage_selected_fields or [] correctly produces:

  • None or [] → [] → all columns read (full-refresh no projection, intentional)
  • ["col_a"] or [] → ["col_a"] → only selected column read (projection case)

No change needed.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
posthog/temporal/data_imports/sources/snowflake/tests/test_snowflake.py:160-173
`test_full_refresh_subset_keeps_incremental_field` calls `_build_query` with `should_use_incremental_field=False` and `incremental_field=None`, so there is no incremental field to "keep". The assertion (`'"EMAIL"' in sql`, `'"ID"' in sql`) is also a strict subset of what `test_full_refresh_subset_projects_pk_retained` already checks with `sql.startswith('SELECT "EMAIL", "ID" FROM IDENTIFIER(%s)')`. The test says something different from what it does (OnceAndOnlyOnce).

```suggestion
    @pytest.mark.parametrize(
        "enabled_columns,primary_keys,incremental_field,expected_start",
        [
            (["EMAIL"], ["ID"], None, 'SELECT "EMAIL", "ID" FROM IDENTIFIER(%s)'),
            (["EMAIL"], ["ID"], "CREATED_AT", 'SELECT "EMAIL", "ID", "CREATED_AT" FROM IDENTIFIER(%s)'),
        ],
    )
    def test_full_refresh_subset_retains_pk_and_incremental_field(
        self, enabled_columns, primary_keys, incremental_field, expected_start
    ):
        sql, _ = _build_query(
            "DB",
            "PUBLIC",
            "t",
            False,
            incremental_field,
            None,
            None,
            enabled_columns=enabled_columns,
            primary_keys=primary_keys,
        )
        assert sql.startswith(expected_start)
```

Reviews (2): Last reviewed commit: "fix(data-warehouse): annotate resolved_s..." | Re-trigger Greptile

…ions to satisfy mypy

The CDC pre-fetch loop earlier in the function already typed
`resolved_source_schema` / `resolved_source_table_name` as `str` from
`get_postgres_source_table_location`. When PR2 added the non-Postgres
`else` branch with `... if X else None`, mypy flagged it as
`str | None` re-binding into a `str` name.

Split the two concerns:

- `metadata_source_*` (`str | None`) feeds the source-type-agnostic
  `sql_schema_metadata` call, which already accepts `None`.
- `postgres_db_schema` / `postgres_db_table_name` (`str`) hold the
  guaranteed-non-None Postgres resolver output, used by the CDC
  publication + direct-postgres upsert paths that only ever run for
  Postgres sources anyway.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…rce, drop literal source-type set

- All 6 concrete `SQLSource` subclasses overrode `supports_column_selection`
  to `True`. Flipping the base default and dropping the overrides is a
  net deletion that better matches the contract: a class extending
  `SQLSource` can select columns unless it explicitly opts out.
- `_SQL_SOURCE_TYPES_WITH_COLUMN_SELECTION` was a literal mirror of the
  same flag, kept around because test mocks of `SourceRegistry.get_source`
  don't satisfy `isinstance(SQLSource)`. The schema-metadata gate now uses
  `bool(getattr(source, "supports_column_selection", False))` — same coercion
  the serializer already uses, lets mocks satisfy it. The `refresh_schemas`
  gate keeps the `isinstance(SQLSource)` check (needed to call the typed
  hook) but reads the flag off the source directly instead of a parallel
  enum set.
- Trim a few overly-explanatory comments left over from earlier review iterations.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…ource, drop dual postgres location variables

Three cleanups from review:

- Default `supports_column_selection = False` on `_BaseSource` so every
  source has the attribute. `getattr(source, "supports_column_selection", False)`
  collapses to `source.supports_column_selection` at all 4 call sites
  (serializer, schema-metadata gate, wizard, public source configs viewset).
  The `bool()` wrap stays on the serializer (Mock attrs aren't orjson-safe).

- The previous fix introduced parallel `postgres_db_schema` / `postgres_db_table_name`
  locals to satisfy mypy at the Postgres-only call sites (CDC publication,
  direct-postgres upsert). Replace with a single set of `metadata_source_*`
  locals plus narrowing `assert` at each Postgres-only call site —
  `get_postgres_source_table_location` already guarantees non-None inside
  that branch.

- `SchemaScene.showColumnsSection` no longer falls back to
  `available_columns.length > 0` — the legacy fallback was added during
  a local-env diagnosis that turned out to be a stale Vite issue, not
  a real backward-compat concern. Single source of truth is now the
  backend `supports_column_selection` flag.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
…rowing

Asserts get stripped under `python -O` and feel out of place in a request
handler. `cast(str, ...)` is the mypy-only narrowing we actually want here —
no runtime check, no behavior change.

Generated-By: PostHog Code
Task-Id: 8363dadb-b9a9-4287-9257-8f0e3c4d3cda
@github-actions
Copy link
Copy Markdown
Contributor

🎭 Playwright report · View test results →

⚠️ 2 flaky tests:

  • Inline editing insight title via compact card popover (chromium)
  • launch basic survey from multivariant feature flag (chromium)

These issues are not necessarily caused by your changes.
Annoyed by this comment? Help fix flakies and failures and it'll disappear!

@danielcarletti danielcarletti merged commit 3db2d7a into master May 29, 2026
244 checks passed
@danielcarletti danielcarletti deleted the posthog-code/column-selection-all-db-sources-pr2 branch May 29, 2026 13:03
inkeep Bot added a commit to PostHog/posthog.com that referenced this pull request May 29, 2026
Per-column sync selection is now supported on Redshift (previously Postgres only).
Adds documentation for selecting specific columns during source setup and after setup.

Ref: PostHog/posthog#60155
@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented May 29, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-05-29 13:25 UTC Run
prod-us ✅ Deployed 2026-05-29 13:54 UTC Run
prod-eu ✅ Deployed 2026-05-29 13:55 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants