diff --git a/frontend/src/queries/nodes/DataTable/DataTable.tsx b/frontend/src/queries/nodes/DataTable/DataTable.tsx index 6caede501b4d1..3df4f5ce101f1 100644 --- a/frontend/src/queries/nodes/DataTable/DataTable.tsx +++ b/frontend/src/queries/nodes/DataTable/DataTable.tsx @@ -9,7 +9,7 @@ import { NodeKind, PersonsNode, QueryContext, - SourcedPersonsQuery, + PersonsQuery, } from '~/queries/schema' import { useCallback, useState } from 'react' import { BindLogic, useValues } from 'kea' @@ -36,7 +36,7 @@ import { isHogQlAggregation, isHogQLQuery, isPersonsNode, - isSourcedPersonsQuery, + isPersonsQuery, taxonomicFilterToHogQl, } from '~/queries/utils' import { PersonPropertyFilters } from '~/queries/nodes/PersonsNode/PersonPropertyFilters' @@ -333,16 +333,16 @@ export function DataTable({ uniqueKey, query, setQuery, context, cachedResults } ].filter((column) => !query.hiddenColumns?.includes(column.dataIndex) && column.dataIndex !== '*') const setQuerySource = useCallback( - (source: EventsNode | EventsQuery | PersonsNode | HogQLQuery | SourcedPersonsQuery) => + (source: EventsNode | EventsQuery | PersonsNode | HogQLQuery | PersonsQuery) => setQuery?.({ ...query, source }), [setQuery] ) const firstRowLeft = [ - isSourcedPersonsQuery(query.source) ? ( + isPersonsQuery(query.source) ? ( - isSourcedPersonsQuery(query.source) + isPersonsQuery(query.source) ? setQuery?.({ kind: NodeKind.InsightVizNode, source: query.source.source, full: true }) : null } @@ -356,13 +356,13 @@ export function DataTable({ uniqueKey, query, setQuery, context, cachedResults } showEventFilter && isEventsQuery(query.source) ? ( ) : null, - showSearch && (isPersonsNode(query.source) || isSourcedPersonsQuery(query.source)) ? ( + showSearch && (isPersonsNode(query.source) || isPersonsQuery(query.source)) ? ( ) : null, showPropertyFilter && (isEventsQuery(query.source) || isHogQLQuery(query.source)) ? ( ) : null, - showPropertyFilter && (isPersonsNode(query.source) || isSourcedPersonsQuery(query.source)) ? ( + showPropertyFilter && (isPersonsNode(query.source) || isPersonsQuery(query.source)) ? ( ) : null, ].filter((x) => !!x) diff --git a/frontend/src/queries/nodes/DataTable/renderColumn.tsx b/frontend/src/queries/nodes/DataTable/renderColumn.tsx index e2fd232193f11..fa676d48a6c34 100644 --- a/frontend/src/queries/nodes/DataTable/renderColumn.tsx +++ b/frontend/src/queries/nodes/DataTable/renderColumn.tsx @@ -11,7 +11,7 @@ import { isEventsQuery, isHogQLQuery, isPersonsNode, - isSourcedPersonsQuery, + isPersonsQuery, isTimeToSeeDataSessionsQuery, trimQuotes, } from '~/queries/utils' @@ -217,7 +217,7 @@ export function renderColumn( ) - } else if (key === 'person.$delete' && (isPersonsNode(query.source) || isSourcedPersonsQuery(query.source))) { + } else if (key === 'person.$delete' && (isPersonsNode(query.source) || isPersonsQuery(query.source))) { const personRecord = record as PersonType return } else if (key.startsWith('context.columns.')) { @@ -236,7 +236,7 @@ export function renderColumn( } else if (key.startsWith('user.') && isTimeToSeeDataSessionsQuery(query.source)) { const [parent, child] = key.split('.') return typeof record === 'object' ? record[parent][child] : 'unknown' - } else if (isSourcedPersonsQuery(query.source)) { + } else if (isPersonsQuery(query.source)) { if (key === 'id') { return
{String(record[0])}
} else if (key === 'created_at') { diff --git a/frontend/src/queries/nodes/DataTable/utils.ts b/frontend/src/queries/nodes/DataTable/utils.ts index e2fb699dfee07..3a54cb66de696 100644 --- a/frontend/src/queries/nodes/DataTable/utils.ts +++ b/frontend/src/queries/nodes/DataTable/utils.ts @@ -11,7 +11,6 @@ export const defaultDataTableEventColumns: HogQLExpression[] = [ ] export const defaultDataTablePersonColumns: HogQLExpression[] = ['person', 'id', 'created_at', 'person.$delete'] -export const defaultDataTableSourcedPersonColumns: HogQLExpression[] = ['person', 'id', 'created_at'] export function defaultDataTableColumns(kind: NodeKind): HogQLExpression[] { return kind === NodeKind.PersonsNode @@ -20,8 +19,8 @@ export function defaultDataTableColumns(kind: NodeKind): HogQLExpression[] { ? defaultDataTableEventColumns : kind === NodeKind.EventsNode ? defaultDataTableEventColumns.filter((c) => c !== '*') - : kind === NodeKind.SourcedPersonsQuery - ? defaultDataTableSourcedPersonColumns + : kind === NodeKind.PersonsQuery + ? defaultDataTablePersonColumns : [] } diff --git a/frontend/src/queries/nodes/PersonsNode/PersonPropertyFilters.tsx b/frontend/src/queries/nodes/PersonsNode/PersonPropertyFilters.tsx index 5d56eedf75bf7..4b2ee5e19604d 100644 --- a/frontend/src/queries/nodes/PersonsNode/PersonPropertyFilters.tsx +++ b/frontend/src/queries/nodes/PersonsNode/PersonPropertyFilters.tsx @@ -1,13 +1,13 @@ -import { PersonsNode, SourcedPersonsQuery } from '~/queries/schema' +import { PersonsNode, PersonsQuery } from '~/queries/schema' import { PropertyFilters } from 'lib/components/PropertyFilters/PropertyFilters' import { AnyPropertyFilter } from '~/types' import { useState } from 'react' import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' -import { isPersonsNode, isSourcedPersonsQuery } from '~/queries/utils' +import { isPersonsNode, isPersonsQuery } from '~/queries/utils' interface PersonPropertyFiltersProps { - query: PersonsNode | SourcedPersonsQuery - setQuery?: (query: PersonsNode | SourcedPersonsQuery) => void + query: PersonsNode | PersonsQuery + setQuery?: (query: PersonsNode | PersonsQuery) => void } let uniqueNode = 0 @@ -22,11 +22,11 @@ export function PersonPropertyFilters({ query, setQuery }: PersonPropertyFilters ...query, properties: value, } as PersonsNode) - } else if (isSourcedPersonsQuery(query)) { + } else if (isPersonsQuery(query)) { setQuery?.({ ...query, properties: value, - } as SourcedPersonsQuery) + } as PersonsQuery) } }} pageKey={`PersonPropertyFilters.${id}`} diff --git a/frontend/src/queries/nodes/PersonsNode/PersonsSearch.tsx b/frontend/src/queries/nodes/PersonsNode/PersonsSearch.tsx index 4acf6c891c5ba..a190d1b4434b6 100644 --- a/frontend/src/queries/nodes/PersonsNode/PersonsSearch.tsx +++ b/frontend/src/queries/nodes/PersonsNode/PersonsSearch.tsx @@ -1,16 +1,16 @@ -import { PersonsNode, SourcedPersonsQuery } from '~/queries/schema' +import { PersonsNode, PersonsQuery } from '~/queries/schema' import { LemonInput } from 'lib/lemon-ui/LemonInput/LemonInput' import { IconInfo } from 'lib/lemon-ui/icons' import { Tooltip } from 'lib/lemon-ui/Tooltip' import { useDebouncedQuery } from '~/queries/hooks/useDebouncedQuery' interface PersonSearchProps { - query: PersonsNode | SourcedPersonsQuery - setQuery?: (query: PersonsNode | SourcedPersonsQuery) => void + query: PersonsNode | PersonsQuery + setQuery?: (query: PersonsNode | PersonsQuery) => void } export function PersonsSearch({ query, setQuery }: PersonSearchProps): JSX.Element { - const { value, onChange } = useDebouncedQuery( + const { value, onChange } = useDebouncedQuery( query, setQuery, (query) => query.search || '', diff --git a/frontend/src/queries/query.ts b/frontend/src/queries/query.ts index 7364dc01d68ab..b8335d7038a62 100644 --- a/frontend/src/queries/query.ts +++ b/frontend/src/queries/query.ts @@ -11,7 +11,7 @@ import { isHogQLQuery, isInsightVizNode, isLifecycleQuery, - isSourcedPersonsQuery, + isPersonsQuery, } from './utils' import api, { ApiMethodOptions } from 'lib/api' import { getCurrentTeamId } from 'lib/utils/logics' @@ -44,7 +44,7 @@ export function queryExportContext( return queryExportContext(query.source, methodOptions, refresh) } else if (isDataTableNode(query)) { return queryExportContext(query.source, methodOptions, refresh) - } else if (isEventsQuery(query) || isSourcedPersonsQuery(query)) { + } else if (isEventsQuery(query) || isPersonsQuery(query)) { return { source: query, max_limit: EXPORT_MAX_LIMIT, diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json index 608891921d448..ad5628d48295b 100644 --- a/frontend/src/queries/schema.json +++ b/frontend/src/queries/schema.json @@ -97,7 +97,7 @@ "$ref": "#/definitions/TimeToSeeDataSessionsQuery" }, { - "$ref": "#/definitions/SourcedPersonsQuery" + "$ref": "#/definitions/PersonsQuery" } ] }, @@ -388,7 +388,7 @@ "$ref": "#/definitions/PersonsNode" }, { - "$ref": "#/definitions/SourcedPersonsQuery" + "$ref": "#/definitions/PersonsQuery" }, { "$ref": "#/definitions/HogQLQuery" @@ -1671,6 +1671,70 @@ "required": ["kind"], "type": "object" }, + "PersonsQuery": { + "additionalProperties": false, + "properties": { + "day": { + "type": "string" + }, + "group": { + "type": "string" + }, + "kind": { + "const": "PersonsQuery", + "type": "string" + }, + "properties": { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/PersonPropertyFilter" + }, + { + "$ref": "#/definitions/HogQLPropertyFilter" + } + ] + }, + "type": "array" + }, + "response": { + "$ref": "#/definitions/PersonsQueryResponse", + "description": "Cached query response" + }, + "search": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/InsightQueryNode" + } + }, + "required": ["kind", "source"], + "type": "object" + }, + "PersonsQueryResponse": { + "additionalProperties": false, + "properties": { + "hogql": { + "type": "string" + }, + "results": { + "description": "Results in the format: [ ['uuid', breakdown1, breakdown2, ...], ... ]", + "items": { + "items": {}, + "type": "array" + }, + "type": "array" + }, + "timings": { + "items": { + "$ref": "#/definitions/QueryTiming" + }, + "type": "array" + } + }, + "required": ["results", "hogql"], + "type": "object" + }, "PropertyFilterValue": { "anyOf": [ { @@ -2059,70 +2123,6 @@ "enum": ["Volume", "Stickiness", "Lifecycle"], "type": "string" }, - "SourcedPersonsQuery": { - "additionalProperties": false, - "properties": { - "day": { - "type": "string" - }, - "group": { - "type": "string" - }, - "kind": { - "const": "SourcedPersonsQuery", - "type": "string" - }, - "properties": { - "items": { - "anyOf": [ - { - "$ref": "#/definitions/PersonPropertyFilter" - }, - { - "$ref": "#/definitions/HogQLPropertyFilter" - } - ] - }, - "type": "array" - }, - "response": { - "$ref": "#/definitions/SourcedPersonsQueryResponse", - "description": "Cached query response" - }, - "search": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/InsightQueryNode" - } - }, - "required": ["kind", "source"], - "type": "object" - }, - "SourcedPersonsQueryResponse": { - "additionalProperties": false, - "properties": { - "hogql": { - "type": "string" - }, - "results": { - "description": "Results in the format: [ ['uuid', breakdown1, breakdown2, ...], ... ]", - "items": { - "items": {}, - "type": "array" - }, - "type": "array" - }, - "timings": { - "items": { - "$ref": "#/definitions/QueryTiming" - }, - "type": "array" - } - }, - "required": ["results", "hogql"], - "type": "object" - }, "StepOrderValue": { "enum": ["strict", "unordered", "ordered"], "type": "string" diff --git a/frontend/src/queries/schema.ts b/frontend/src/queries/schema.ts index 9e96ac84324c4..efcb15e220edb 100644 --- a/frontend/src/queries/schema.ts +++ b/frontend/src/queries/schema.ts @@ -45,7 +45,7 @@ export enum NodeKind { PersonsNode = 'PersonsNode', HogQLQuery = 'HogQLQuery', HogQLMetadata = 'HogQLMetadata', - SourcedPersonsQuery = 'SourcedPersonsQuery', + PersonsQuery = 'PersonsQuery', // Interface nodes DataTableNode = 'DataTableNode', @@ -78,7 +78,7 @@ export type AnyDataNode = | HogQLQuery | HogQLMetadata | TimeToSeeDataSessionsQuery - | SourcedPersonsQuery + | PersonsQuery export type QuerySchema = // Data nodes (see utils.ts) @@ -280,7 +280,7 @@ export type HasPropertiesNode = EventsNode | EventsQuery | PersonsNode export interface DataTableNode extends Node, DataTableNodeViewProps { kind: NodeKind.DataTableNode /** Source of the events */ - source: EventsNode | EventsQuery | PersonsNode | SourcedPersonsQuery | HogQLQuery | TimeToSeeDataSessionsQuery + source: EventsNode | EventsQuery | PersonsNode | PersonsQuery | HogQLQuery | TimeToSeeDataSessionsQuery /** Columns shown in the table, unless the `source` provides them. */ columns?: HogQLExpression[] @@ -463,21 +463,21 @@ export interface LifecycleQuery extends InsightsQueryBase { response?: LifecycleQueryResponse } -export interface SourcedPersonsQueryResponse { +export interface PersonsQueryResponse { /** Results in the format: [ ['uuid', breakdown1, breakdown2, ...], ... ] */ results: any[][] // typed as any[], not [str, ...any] because python hogql: string timings?: QueryTiming[] } -export interface SourcedPersonsQuery extends DataNode { - kind: NodeKind.SourcedPersonsQuery +export interface PersonsQuery extends DataNode { + kind: NodeKind.PersonsQuery source: InsightQueryNode day?: string group?: string search?: string properties?: (PersonPropertyFilter | HogQLPropertyFilter)[] - response?: SourcedPersonsQueryResponse + response?: PersonsQueryResponse } export type InsightQueryNode = diff --git a/frontend/src/queries/utils.ts b/frontend/src/queries/utils.ts index c09db7991f3c4..e0804a0a18550 100644 --- a/frontend/src/queries/utils.ts +++ b/frontend/src/queries/utils.ts @@ -26,7 +26,7 @@ import { TimeToSeeDataJSONNode, DatabaseSchemaQuery, SavedInsightNode, - SourcedPersonsQuery, + PersonsQuery, } from '~/queries/schema' import { TaxonomicFilterGroupType, TaxonomicFilterValue } from 'lib/components/TaxonomicFilter/types' import { dayjs } from 'lib/dayjs' @@ -38,7 +38,7 @@ export function isDataNode(node?: Node | null): node is EventsQuery | PersonsNod isPersonsNode(node) || isTimeToSeeDataSessionsQuery(node) || isHogQLQuery(node) || - isSourcedPersonsQuery(node) + isPersonsQuery(node) ) } @@ -81,8 +81,8 @@ export function isPersonsNode(node?: Node | null): node is PersonsNode { return node?.kind === NodeKind.PersonsNode } -export function isSourcedPersonsQuery(node?: Node | null): node is SourcedPersonsQuery { - return node?.kind === NodeKind.SourcedPersonsQuery +export function isPersonsQuery(node?: Node | null): node is PersonsQuery { + return node?.kind === NodeKind.PersonsQuery } export function isDataTableNode(node?: Node | null): node is DataTableNode { diff --git a/frontend/src/scenes/saved-insights/SavedInsights.tsx b/frontend/src/scenes/saved-insights/SavedInsights.tsx index 241e0c5303e71..0d06232f657fd 100644 --- a/frontend/src/scenes/saved-insights/SavedInsights.tsx +++ b/frontend/src/scenes/saved-insights/SavedInsights.tsx @@ -241,9 +241,9 @@ export const QUERY_TYPES_METADATA: Record = { icon: InsightSQLIcon, inMenu: true, }, - [NodeKind.SourcedPersonsQuery]: { - name: 'Sourced Persons', - description: 'List of persons derived from a complex query', + [NodeKind.PersonsQuery]: { + name: 'Persons', + description: 'List of persons matching specified conditions', icon: IconPerson, inMenu: false, }, diff --git a/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx b/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx index 73f238b855070..d2b397e7dd67d 100644 --- a/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx +++ b/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx @@ -9,7 +9,7 @@ import { urlsForDatasets } from '../persons-modal/persons-modal-utils' import { DateDisplay } from 'lib/components/DateDisplay' import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo' import { trendsDataLogic } from '../trendsDataLogic' -import { DataTableNode, NodeKind, SourcedPersonsQuery } from '~/queries/schema' +import { DataTableNode, NodeKind, PersonsQuery } from '~/queries/schema' import { insightDataLogic } from 'scenes/insights/insightDataLogic' import { isInsightVizNode } from '~/queries/utils' @@ -83,8 +83,8 @@ export function ActionsLineGraph({ const label = dataset?.label ?? dataset?.labels?.[index] ?? '' if (isLifecycle && query && isInsightVizNode(query)) { - const personsQuery: SourcedPersonsQuery = { - kind: NodeKind.SourcedPersonsQuery, + const personsQuery: PersonsQuery = { + kind: NodeKind.PersonsQuery, source: query.source, } const dataTable: DataTableNode = { diff --git a/posthog/api/query.py b/posthog/api/query.py index 01c695573dde1..dc5e531cdbfc9 100644 --- a/posthog/api/query.py +++ b/posthog/api/query.py @@ -203,7 +203,7 @@ def process_query(team: Team, query_json: Dict, default_limit: Optional[int] = N tag_queries(query=query_json) - if query_kind == "LifecycleQuery" or query_kind == "SourcedPersonsQuery": + if query_kind == "LifecycleQuery" or query_kind == "PersonsQuery": query_runner = get_query_runner(query_json, team) return _unwrap_pydantic_dict(query_runner.run()) elif query_kind == "EventsQuery": diff --git a/posthog/hogql_queries/sourced_persons_query_runner.py b/posthog/hogql_queries/persons_query_runner.py similarity index 64% rename from posthog/hogql_queries/sourced_persons_query_runner.py rename to posthog/hogql_queries/persons_query_runner.py index bda161e707289..8de0a27bb4e2e 100644 --- a/posthog/hogql_queries/sourced_persons_query_runner.py +++ b/posthog/hogql_queries/persons_query_runner.py @@ -6,27 +6,27 @@ from posthog.hogql.timings import HogQLTimings from posthog.hogql_queries.query_runner import QueryRunner, get_query_runner from posthog.models import Team -from posthog.schema import SourcedPersonsQuery, SourcedPersonsQueryResponse, LifecycleQuery +from posthog.schema import PersonsQuery, PersonsQueryResponse, LifecycleQuery -class SourcedPersonsQueryRunner(QueryRunner): - query: SourcedPersonsQuery +class PersonsQueryRunner(QueryRunner): + query: PersonsQuery - def __init__(self, query: SourcedPersonsQuery | Dict[str, Any], team: Team, timings: Optional[HogQLTimings] = None): + def __init__(self, query: PersonsQuery | Dict[str, Any], team: Team, timings: Optional[HogQLTimings] = None): super().__init__(team, timings) - if isinstance(query, SourcedPersonsQuery): + if isinstance(query, PersonsQuery): self.query = query else: - self.query = SourcedPersonsQuery.parse_obj(query) + self.query = PersonsQuery.parse_obj(query) - def run(self) -> SourcedPersonsQueryResponse: + def run(self) -> PersonsQueryResponse: response = execute_hogql_query( - query_type="SourcedPersonsQuery", + query_type="PersonsQuery", query=self.to_query(), team=self.team, timings=self.timings, ) - return SourcedPersonsQueryResponse(results=response.results, timings=response.timings, hogql=response.hogql) + return PersonsQueryResponse(results=response.results, timings=response.timings, hogql=response.hogql) def to_query(self) -> ast.SelectQuery: source = self.query.source diff --git a/posthog/hogql_queries/query_runner.py b/posthog/hogql_queries/query_runner.py index b86285be64b17..9cfeeb95d962a 100644 --- a/posthog/hogql_queries/query_runner.py +++ b/posthog/hogql_queries/query_runner.py @@ -22,10 +22,10 @@ def get_query_runner( from .lifecycle_query_runner import LifecycleQueryRunner return LifecycleQueryRunner(query=query, team=team, timings=timings) - if kind == "SourcedPersonsQuery": - from .sourced_persons_query_runner import SourcedPersonsQueryRunner + if kind == "PersonsQuery": + from .persons_query_runner import PersonsQueryRunner - return SourcedPersonsQueryRunner(query=query, team=team, timings=timings) + return PersonsQueryRunner(query=query, team=team, timings=timings) raise ValueError(f"Can't get a runner for an unknown query kind: {kind}") diff --git a/posthog/schema.py b/posthog/schema.py index 1cd29dbe56108..a09e33564c209 100644 --- a/posthog/schema.py +++ b/posthog/schema.py @@ -424,17 +424,6 @@ class ShownAsValue(str, Enum): Lifecycle = "Lifecycle" -class SourcedPersonsQueryResponse(BaseModel): - model_config = ConfigDict( - extra="forbid", - ) - hogql: str - results: List[List] = Field( - ..., description="Results in the format: [ ['uuid', breakdown1, breakdown2, ...], ... ]" - ) - timings: Optional[List[QueryTiming]] = None - - class StepOrderValue(str, Enum): strict = "strict" unordered = "unordered" @@ -650,6 +639,17 @@ class PersonPropertyFilter(BaseModel): value: Optional[Union[str, float, List[Union[str, float]]]] = None +class PersonsQueryResponse(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + hogql: str + results: List[List] = Field( + ..., description="Results in the format: [ ['uuid', breakdown1, breakdown2, ...], ... ]" + ) + timings: Optional[List[QueryTiming]] = None + + class RetentionFilter(BaseModel): model_config = ConfigDict( extra="forbid", @@ -1209,15 +1209,15 @@ class InsightVizNode(BaseModel): source: Union[TrendsQuery, FunnelsQuery, RetentionQuery, PathsQuery, StickinessQuery, LifecycleQuery] -class SourcedPersonsQuery(BaseModel): +class PersonsQuery(BaseModel): model_config = ConfigDict( extra="forbid", ) day: Optional[str] = None group: Optional[str] = None - kind: Literal["SourcedPersonsQuery"] = "SourcedPersonsQuery" + kind: Literal["PersonsQuery"] = "PersonsQuery" properties: Optional[List[Union[PersonPropertyFilter, HogQLPropertyFilter]]] = None - response: Optional[SourcedPersonsQueryResponse] = Field(default=None, description="Cached query response") + response: Optional[PersonsQueryResponse] = Field(default=None, description="Cached query response") search: Optional[str] = None source: Union[TrendsQuery, FunnelsQuery, RetentionQuery, PathsQuery, StickinessQuery, LifecycleQuery] @@ -1265,9 +1265,9 @@ class DataTableNode(BaseModel): showSavedQueries: Optional[bool] = Field(default=None, description="Shows a list of saved queries") showSearch: Optional[bool] = Field(default=None, description="Include a free text search field (PersonsNode only)") showTimings: Optional[bool] = Field(default=None, description="Show a detailed query timing breakdown") - source: Union[ - EventsNode, EventsQuery, PersonsNode, SourcedPersonsQuery, HogQLQuery, TimeToSeeDataSessionsQuery - ] = Field(..., description="Source of the events") + source: Union[EventsNode, EventsQuery, PersonsNode, PersonsQuery, HogQLQuery, TimeToSeeDataSessionsQuery] = Field( + ..., description="Source of the events" + ) class Model(RootModel): @@ -1291,7 +1291,7 @@ class Model(RootModel): HogQLQuery, HogQLMetadata, TimeToSeeDataSessionsQuery, - SourcedPersonsQuery, + PersonsQuery, ], ]