mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 00:47:50 +01:00
feat(insights): Support HogQL for data warehouse filters (#26245)
This commit is contained in:
parent
ad1e69e18b
commit
bbacbc5fad
@ -40,6 +40,7 @@ import {
|
|||||||
} from 'scenes/trends/mathsLogic'
|
} from 'scenes/trends/mathsLogic'
|
||||||
|
|
||||||
import { actionsModel } from '~/models/actionsModel'
|
import { actionsModel } from '~/models/actionsModel'
|
||||||
|
import { NodeKind } from '~/queries/schema'
|
||||||
import { isInsightVizNode, isStickinessQuery } from '~/queries/utils'
|
import { isInsightVizNode, isStickinessQuery } from '~/queries/utils'
|
||||||
import {
|
import {
|
||||||
ActionFilter,
|
ActionFilter,
|
||||||
@ -596,9 +597,20 @@ export function ActionFilterRow({
|
|||||||
onChange={(properties) => updateFilterProperty({ properties, index })}
|
onChange={(properties) => updateFilterProperty({ properties, index })}
|
||||||
showNestedArrow={showNestedArrow}
|
showNestedArrow={showNestedArrow}
|
||||||
disablePopover={!propertyFiltersPopover}
|
disablePopover={!propertyFiltersPopover}
|
||||||
|
metadataSource={
|
||||||
|
filter.type == TaxonomicFilterGroupType.DataWarehouse
|
||||||
|
? {
|
||||||
|
kind: NodeKind.HogQLQuery,
|
||||||
|
query: `select ${filter.distinct_id_field} from ${filter.table_name}`,
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
taxonomicGroupTypes={
|
taxonomicGroupTypes={
|
||||||
filter.type == TaxonomicFilterGroupType.DataWarehouse
|
filter.type == TaxonomicFilterGroupType.DataWarehouse
|
||||||
? [TaxonomicFilterGroupType.DataWarehouseProperties]
|
? [
|
||||||
|
TaxonomicFilterGroupType.DataWarehouseProperties,
|
||||||
|
TaxonomicFilterGroupType.HogQLExpression,
|
||||||
|
]
|
||||||
: propertiesTaxonomicGroupTypes
|
: propertiesTaxonomicGroupTypes
|
||||||
}
|
}
|
||||||
eventNames={
|
eventNames={
|
||||||
|
Loading…
Reference in New Issue
Block a user