Skip to content

refactor(data-warehouse): hoist column-selection helpers into common/sql#60153

Merged
danielcarletti merged 9 commits into
masterfrom
posthog-code/column-selection-all-db-sources-pr1
May 28, 2026
Merged

refactor(data-warehouse): hoist column-selection helpers into common/sql#60153
danielcarletti merged 9 commits into
masterfrom
posthog-code/column-selection-all-db-sources-pr1

Conversation

@danielcarletti
Copy link
Copy Markdown
Contributor

Problem

Column selection (the ColumnSelectionModal picker that lets a user pick a subset of source columns to sync into the warehouse) currently works only for Postgres — both direct-query and warehouse-managed modes. Every other SQL source (MySQL, MSSQL, BigQuery, Snowflake, Redshift) is forced into SELECT *, which inflates sync cost, leaks PII columns into HogQL, and degrades sync reliability on wide tables.

This is the first of two PRs that close that gap. It's a pure refactor: it hoists the Postgres column-selection logic into the common SQL layer so PR2 can flip the capability flag on for each remaining driver without touching external_data_source.py again.

Changes

Hoisted into posthog/temporal/data_imports/sources/common/sql/

  • projection.py (new) — compute_projected_columns, format_projected_select_clause, filter_columns_by_enabled_columns, filter_dwh_columns_by_enabled_columns, project_arrow_columns, prune_enabled_columns. Pure logic; no driver-specific quoting.
  • metadata.py (new) — sql_schema_metadata (rename of postgres_schema_metadata, identical shape) and extract_available_column_names.
  • SelectQueryBuilder.select_all — gains enabled_columns + primary_keys parameters. When unset, emits SELECT * (current behavior); when set, projects via the builder's quoter and always retains PKs + active incremental field. MySQL/MSSQL/Snowflake/Redshift pick this up for free in PR2.

SQLSource additions

  • supports_column_selection: bool class attribute. Postgres flips to True; every other SQL source stays False.
  • reconcile_schema_metadata default hook — writes schema_metadata to every matching row (merging, not replacing), and prunes enabled_columns to the intersection with the newly discovered column set so a source-side column drop can't break the next sync. Postgres overrides to delegate to reconcile_postgres_schemas (keeps direct-query DataWarehouseTable rebuild).

SourceInputs.enabled_columns

Threaded through workflow_activities/import_data_sync.py so every SQL driver reads the user's column selection from a single field instead of re-querying schema.enabled_columns in each source_for_pipeline.

Capability flag exposed on the API

ExternalDataSourceSerializer.supports_column_selection (read-only, sourced from SourceRegistry.get_source(...).supports_column_selection). The frontend will read this single boolean in PR2 — no hardcoded source-type lists anywhere in TS. Regenerated api.schemas.ts accordingly.

Backwards compatibility

  • Postgres call sites (postgres/postgres.py, partitioned_tables.py) still produce identical SQL — postgres/query_builders.build_select_clause is now a thin wrapper over compute_projected_columns + psycopg.sql.Identifier(...) so psycopg's escaping rules still apply.
  • postgres_helpers.{filter_columns_by_enabled_columns, filter_dwh_columns_by_enabled_columns} remain importable as re-exports for legacy callers. All in-repo callers updated to import from common/sql/ directly.
  • postgres_schema_metadata becomes a thin wrapper that delegates to sql_schema_metadata — existing rows are read-compatible.
  • The create-flow schema_metadata write at external_data_source.py:1168 keeps its Postgres gate; non-Postgres sources will populate schema_metadata on their next refresh_schemas run (every 6h via the discovery schedule) via the new hook. Rejected the alternative — a one-shot data migration would hammer every customer DB simultaneously on deploy.

How did you test this code?

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

Suite Result
common/sql/tests/ (new + existing) 155 passed
postgres/test_postgres.py::TestBuildQuery* (the enabled_columns projection cases at L711-790) 22 passed
products/data_warehouse/backend/test/test_postgres_helpers.py 11 passed
products/data_warehouse/backend/api/test/test_external_data_source.py 184 passed, 1 pre-existing flake (test_list_external_data_source query count, fails identically on master)
products/data_warehouse/backend/api/test/test_external_data_schema.py 45 passed, 2 pre-existing temporal RPC failures (fail identically on master)
posthog/temporal/tests/data_imports/test_import_data.py 13 passed
ruff check + ruff format clean
hogli build:openapi clean — generated supports_column_selection: boolean in api.schemas.ts and services/mcp/src/api/generated.ts
pnpm typescript:check clean against my diff (the 4 WorkflowsScene.tsx errors fail identically on master)

Not tested manually — flag is dark, no UI surface area changes. PR2 ships the user-visible enablement and includes the manual test plan.

Publish to changelog?

no

Docs update

No docs change needed. PR2 updates user-facing docs.

🤖 Agent context

Authored by PostHog Code (Claude Opus 4.7) acting on a user-approved 2-PR plan. Key decisions:

  • PR split: bundled refactor + capability flag here, deferred per-driver _build_query changes + frontend to PR2. Single PR would be ~2.5k lines; the refactor-vs-feature split keeps each side reviewable in isolation. PR2's blast radius is per-driver — a bug in one driver's _build_query doesn't take down the others.
  • Frontend gating uses a backend-derived boolean (supports_column_selection), not a hardcoded if source_type in [...] in TS. Source-type literals in frontend rot the moment a new SQL source lands.
  • Postgres reconcile call sites in external_data_source.py stay as direct reconcile_postgres_schemas(...) calls (not routed through the new hook) so existing tests that mock SourceRegistry.get_source still exercise the real direct-query DataWarehouseTable rebuild. The hook still works in production where the real PostgresSource instance is the one dispatched.
  • Stale enabled_columns pruning — pre-existing latent bug in Postgres (a source-side column drop would cause SELECT … missing_col next sync). Fixed defensively here so PR2 doesn't enlarge exposure. Pruning is logged via structlog so we can monitor frequency.

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 20:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down.

Add the run-playwright label if you want an E2E sweep before merging — CI will pick it up automatically.

Most PRs don't need this. Real regressions still get caught on master and fix-forward.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Size Change: 0 B

Total Size: 80.2 MB

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

compressed-size-action

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 26, 2026

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

---

### Issue 1 of 2
posthog/temporal/data_imports/sources/common/sql/projection.py:60-71
The `column in retained` guard in the first loop is always `True` because `retained` is initialised as `set(enabled_columns)`, making it a superset of every element that will be iterated. The same redundancy appears for `pk in retained` in the second loop (all PKs are explicitly added to `retained`), and for `incremental_field in retained` (also added above). These checks add noise without protecting against any real case — simplifying removes the conceptual misdirection.

```suggestion
    seen: set[str] = set()
    ordered: list[str] = []
    for column in enabled_columns:
        if column not in seen:
            seen.add(column)
            ordered.append(column)
    for column in primary_keys or []:
        if column not in seen:
            seen.add(column)
            ordered.append(column)
    if incremental_field and incremental_field not in seen:
        ordered.append(incremental_field)
```

### Issue 2 of 2
posthog/temporal/data_imports/sources/common/sql/tests/test_projection.py:1-21
`project_arrow_columns` is the only exported function in `projection.py` with no tests. Its silent fallback — when `retained` is non-`None` but none of the requested column names exist in the table it returns the original table unchanged — is the kind of behaviour that could mask a driver passing the wrong column list in PR2. Adding a parameterised test covering at least `retained=None` (pass-through), a normal subset, and the all-missing fallback would match the coverage level of every other function in this module.

Reviews (1): Last reviewed commit: "refactor(data-warehouse): hoist column-s..." | Re-trigger Greptile

Comment on lines +60 to +71
seen: set[str] = set()
ordered: list[str] = []
for column in enabled_columns:
if column in retained and column not in seen:
seen.add(column)
ordered.append(column)
for column in primary_keys or []:
if column in retained and column not in seen:
seen.add(column)
ordered.append(column)
if incremental_field and incremental_field in retained and incremental_field not in seen:
ordered.append(incremental_field)
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.

P2 The column in retained guard in the first loop is always True because retained is initialised as set(enabled_columns), making it a superset of every element that will be iterated. The same redundancy appears for pk in retained in the second loop (all PKs are explicitly added to retained), and for incremental_field in retained (also added above). These checks add noise without protecting against any real case — simplifying removes the conceptual misdirection.

Suggested change
seen: set[str] = set()
ordered: list[str] = []
for column in enabled_columns:
if column in retained and column not in seen:
seen.add(column)
ordered.append(column)
for column in primary_keys or []:
if column in retained and column not in seen:
seen.add(column)
ordered.append(column)
if incremental_field and incremental_field in retained and incremental_field not in seen:
ordered.append(incremental_field)
seen: set[str] = set()
ordered: list[str] = []
for column in enabled_columns:
if column not in seen:
seen.add(column)
ordered.append(column)
for column in primary_keys or []:
if column not in seen:
seen.add(column)
ordered.append(column)
if incremental_field and incremental_field not in seen:
ordered.append(incremental_field)
Prompt To Fix With AI
This is a comment left during a code review.
Path: posthog/temporal/data_imports/sources/common/sql/projection.py
Line: 60-71

Comment:
The `column in retained` guard in the first loop is always `True` because `retained` is initialised as `set(enabled_columns)`, making it a superset of every element that will be iterated. The same redundancy appears for `pk in retained` in the second loop (all PKs are explicitly added to `retained`), and for `incremental_field in retained` (also added above). These checks add noise without protecting against any real case — simplifying removes the conceptual misdirection.

```suggestion
    seen: set[str] = set()
    ordered: list[str] = []
    for column in enabled_columns:
        if column not in seen:
            seen.add(column)
            ordered.append(column)
    for column in primary_keys or []:
        if column not in seen:
            seen.add(column)
            ordered.append(column)
    if incremental_field and incremental_field not in seen:
        ordered.append(incremental_field)
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +1 to +21
"""Tests for the column-projection helpers in `common/sql/projection.py`."""

from __future__ import annotations

import pytest

from parameterized import parameterized

from posthog.temporal.data_imports.sources.common.sql.identifiers import (
AnsiIdentifierQuoter,
BacktickIdentifierQuoter,
BracketIdentifierQuoter,
InvalidIdentifierError,
)
from posthog.temporal.data_imports.sources.common.sql.projection import (
compute_projected_columns,
filter_columns_by_enabled_columns,
filter_dwh_columns_by_enabled_columns,
format_projected_select_clause,
prune_enabled_columns,
)
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.

P2 project_arrow_columns is the only exported function in projection.py with no tests. Its silent fallback — when retained is non-None but none of the requested column names exist in the table it returns the original table unchanged — is the kind of behaviour that could mask a driver passing the wrong column list in PR2. Adding a parameterised test covering at least retained=None (pass-through), a normal subset, and the all-missing fallback would match the coverage level of every other function in this module.

Prompt To Fix With AI
This is a comment left during a code review.
Path: posthog/temporal/data_imports/sources/common/sql/tests/test_projection.py
Line: 1-21

Comment:
`project_arrow_columns` is the only exported function in `projection.py` with no tests. Its silent fallback — when `retained` is non-`None` but none of the requested column names exist in the table it returns the original table unchanged — is the kind of behaviour that could mask a driver passing the wrong column list in PR2. Adding a parameterised test covering at least `retained=None` (pass-through), a normal subset, and the all-missing fallback would match the coverage level of every other function in this module.

How can I resolve this? If you propose a fix, please make it concise.

@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 →

…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 added a commit that referenced this pull request May 26, 2026
…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
@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 added a commit that referenced this pull request May 27, 2026
…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
…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
danielcarletti added a commit that referenced this pull request May 27, 2026
…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
@danielcarletti danielcarletti merged commit 4bc25de into master May 28, 2026
241 checks passed
@danielcarletti danielcarletti deleted the posthog-code/column-selection-all-db-sources-pr1 branch May 28, 2026 15:22
@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented May 28, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-05-28 15:57 UTC Run
prod-us ✅ Deployed 2026-05-28 16:18 UTC Run
prod-eu ✅ Deployed 2026-05-28 16:24 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