:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(data-warehouse): scope DWH workflow trigger filter to row columns (#67014)
Tom Owers67926dedfc55
diff --git a/frontend/src/lib/components/CyclotronJob/DataWarehouseColumnsHint.tsx b/frontend/src/lib/components/CyclotronJob/DataWarehouseColumnsHint.tsxindex c72ce00d19a0..b60196fcf3ac 100644--- a/frontend/src/lib/components/CyclotronJob/DataWarehouseColumnsHint.tsx+++ b/frontend/src/lib/components/CyclotronJob/DataWarehouseColumnsHint.tsx@@ -8,7 +8,8 @@ import { DatabaseSchemaField } from '~/queries/schema/schema-general'export type DataWarehouseColumnsHintProps = {schemaColumns: DatabaseSchemaField[]tableName?: string- // Destinations can resolve a person from the row; workflows are row-scoped (no person).+ // Destinations resolve a person and event from the synced row, so `{person}`/`{event}` are valid+ // globals there. Workflow triggers are row-scoped (no person/event), so they leave this false.personAvailable?: boolean}@@ -37,10 +38,13 @@ export function DataWarehouseColumnsHint({<div className="flex flex-col gap-2"><p className="mb-0 text-xs text-secondary">Use <code>{'{record.<column>}'}</code> in your templates to insert a value from the- synced row. {personAvailable ? <code>{'{person}'}</code> : null}- {personAvailable ? ' and ' : null}- <code>{'{event}'}</code> {personAvailable ? 'are' : 'is'} also available. Click a column- to copy its reference.+ synced row.{' '}+ {personAvailable ? (+ <>+ <code>{'{person}'}</code> and <code>{'{event}'}</code> are also available.{' '}+ </>+ ) : null}+ Click a column to copy its reference.</p><div className="flex flex-wrap gap-1">{schemaColumns.map((column) => (diff --git a/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx b/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsxindex baac8a0c97e6..ea2074115950 100644--- a/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx+++ b/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx@@ -131,16 +131,21 @@ export function HogFlowPropertyFilters({setFilters({ ...filters, properties: properties ?? [] } as HogFlowAction['filters'])}}pageKey={`HogFlowPropertyFilters.${filtersKey}`}- taxonomicGroupTypes={[- ...(isDataWarehouse ? [TaxonomicFilterGroupType.DataWarehouseProperties] : []),- TaxonomicFilterGroupType.WorkflowVariables,- TaxonomicFilterGroupType.EventProperties,- TaxonomicFilterGroupType.EventFeatureFlags,- TaxonomicFilterGroupType.PersonProperties,- ...groupsTaxonomicTypes,- TaxonomicFilterGroupType.HogQLExpression,- TaxonomicFilterGroupType.EventMetadata,- ]}+ taxonomicGroupTypes={+ // Warehouse rows are row-scoped — only the synced row's columns make sense to filter on,+ // so event/feature-flag/person/group properties don't apply here.+ isDataWarehouse+ ? [TaxonomicFilterGroupType.DataWarehouseProperties, TaxonomicFilterGroupType.HogQLExpression]+ : [+ TaxonomicFilterGroupType.WorkflowVariables,+ TaxonomicFilterGroupType.EventProperties,+ TaxonomicFilterGroupType.EventFeatureFlags,+ TaxonomicFilterGroupType.PersonProperties,+ ...groupsTaxonomicTypes,+ TaxonomicFilterGroupType.HogQLExpression,+ TaxonomicFilterGroupType.EventMetadata,+ ]+ }taxonomicFilterOptionsFromProp={taxonomicFilterOptionsFromProp}schemaColumns={schemaColumns}dataWarehouseTableName={dataWarehouseTableName}