Skip to content

: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.

chore(experiments): remove legacy experiment query runners (#105011)

Anders6c3d35504833
diff --git a/.semgrep/rules/devex/query-runners-propagate-thread-context.yaml b/.semgrep/rules/devex/query-runners-propagate-thread-context.yaml
index 82c65ed3e4ee..5142629a3bac 100644
--- a/.semgrep/rules/devex/query-runners-propagate-thread-context.yaml
+++ b/.semgrep/rules/devex/query-runners-propagate-thread-context.yaml
@@ -29,12 +29,6 @@ rules:
For a thread that genuinely must not inherit the caller's context, add
`# nosemgrep: query-runners-propagate-thread-context` with a one-line why.
-
- Backlog: `products/experiments/backend/hogql_queries/experiment_trends_query_runner.py`
- still spawns bare threads. Converting it changes which ClickHouse cluster and user its
- subqueries use, and starts metering their scanned bytes, because that runner propagates no
- tags today. That needs its own change, so the rule stays at WARNING until then. The
- new-warnings CI pass still blocks any bare thread a PR adds.
severity: WARNING
languages: [python]
# Anchored at the repo root, which is where CI scans from. The leading slash also opts out of
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json
index bd91912d68af..2574c0e1e88d 100644
--- a/frontend/src/queries/schema.json
+++ b/frontend/src/queries/schema.json
@@ -1768,12 +1768,6 @@
{
"$ref": "#/definitions/TraceSpansAttributeBreakdownQuery"
},
- {
- "$ref": "#/definitions/ExperimentFunnelsQuery"
- },
- {
- "$ref": "#/definitions/ExperimentTrendsQuery"
- },
{
"$ref": "#/definitions/CalendarHeatmapQuery"
},
@@ -9342,121 +9336,6 @@
],
"type": "object"
},
- "CachedExperimentFunnelsQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "cache_key": {
- "type": "string"
- },
- "cache_target_age": {
- "format": "date-time",
- "type": "string"
- },
- "calculation_trigger": {
- "description": "What triggered the calculation of the query, leave empty if user/immediate",
- "type": "string"
- },
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "expected_loss": {
- "type": "number"
- },
- "funnels_query": {
- "$ref": "#/definitions/FunnelsQuery"
- },
- "insight": {
- "items": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
- "type": "array"
- },
- "is_cached": {
- "type": "boolean"
- },
- "kind": {
- "const": "ExperimentFunnelsQuery",
- "type": "string"
- },
- "last_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "next_allowed_client_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
- "query_metadata": {
- "type": "object"
- },
- "query_scan": {
- "$ref": "#/definitions/QueryScanSummary",
- "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
- "type": "boolean"
- },
- "stats_version": {
- "$ref": "#/definitions/integer"
- },
- "timezone": {
- "type": "string"
- },
- "variants": {
- "items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- "type": "array"
- }
- },
- "required": [
- "cache_key",
- "credible_intervals",
- "expected_loss",
- "insight",
- "is_cached",
- "kind",
- "last_refresh",
- "next_allowed_client_refresh",
- "probability",
- "significance_code",
- "significant",
- "timezone",
- "variants"
- ],
- "type": "object"
- },
"CachedExperimentQueryResponse": {
"additionalProperties": false,
"properties": {
@@ -9601,7 +9480,7 @@
"required": ["cache_key", "is_cached", "last_refresh", "next_allowed_client_refresh", "timezone"],
"type": "object"
},
- "CachedExperimentTrendsQueryResponse": {
+ "CachedFunnelCorrelationResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -9615,52 +9494,41 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
- "count_query": {
- "$ref": "#/definitions/TrendsQuery"
+ "columns": {
+ "items": {},
+ "type": "array"
},
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
},
- "exposure_query": {
- "$ref": "#/definitions/TrendsQuery"
+ "hasMore": {
+ "type": "boolean"
},
- "insight": {
- "items": {
- "type": "object"
- },
- "type": "array"
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
},
"is_cached": {
"type": "boolean"
},
- "kind": {
- "const": "ExperimentTrendsQuery",
- "type": "string"
- },
"last_refresh": {
"format": "date-time",
"type": "string"
},
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
"next_allowed_client_refresh": {
"format": "date-time",
"type": "string"
},
- "p_value": {
- "type": "number"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
+ "offset": {
+ "$ref": "#/definitions/integer"
},
"query_metadata": {
"type": "object"
@@ -9673,50 +9541,64 @@
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
},
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
},
- "significant": {
- "type": "boolean"
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
},
- "stats_version": {
- "$ref": "#/definitions/integer"
+ "results": {
+ "$ref": "#/definitions/FunnelCorrelationResult"
},
"timezone": {
"type": "string"
},
- "variants": {
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
"items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
},
"type": "array"
},
"warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
},
"type": "array"
}
},
"required": [
"cache_key",
- "credible_intervals",
- "insight",
"is_cached",
- "kind",
"last_refresh",
"next_allowed_client_refresh",
- "p_value",
- "probability",
- "significance_code",
- "significant",
- "timezone",
- "variants"
+ "results",
+ "timezone"
],
"type": "object"
},
- "CachedFunnelCorrelationResponse": {
+ "CachedFunnelsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -9730,17 +9612,10 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
- "columns": {
- "items": {},
- "type": "array"
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "hasMore": {
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -9752,9 +9627,6 @@
"format": "date-time",
"type": "string"
},
- "limit": {
- "$ref": "#/definitions/integer"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
@@ -9763,9 +9635,6 @@
"format": "date-time",
"type": "string"
},
- "offset": {
- "$ref": "#/definitions/integer"
- },
"query_metadata": {
"type": "object"
},
@@ -9785,9 +9654,7 @@
"$ref": "#/definitions/ResolvedDateRangeResponse",
"description": "The date range used for the query"
},
- "results": {
- "$ref": "#/definitions/FunnelCorrelationResult"
- },
+ "results": {},
"timezone": {
"type": "string"
},
@@ -9798,9 +9665,9 @@
},
"type": "array"
},
- "types": {
- "items": {},
- "type": "array"
+ "total_median_conversion_time": {
+ "description": "Median total conversion time across all completers, computed breakdown-agnostically for the Steps viz header.",
+ "type": ["number", "null"]
},
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
@@ -9834,7 +9701,7 @@
],
"type": "object"
},
- "CachedFunnelsQueryResponse": {
+ "CachedGroupsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -9848,10 +9715,17 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -9859,10 +9733,17 @@
"is_cached": {
"type": "boolean"
},
+ "kind": {
+ "const": "GroupsQuery",
+ "type": "string"
+ },
"last_refresh": {
"format": "date-time",
"type": "string"
},
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
@@ -9871,6 +9752,9 @@
"format": "date-time",
"type": "string"
},
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
"query_metadata": {
"type": "object"
},
@@ -9890,7 +9774,13 @@
"$ref": "#/definitions/ResolvedDateRangeResponse",
"description": "The date range used for the query"
},
- "results": {},
+ "results": {
+ "items": {
+ "items": {},
+ "type": "array"
+ },
+ "type": "array"
+ },
"timezone": {
"type": "string"
},
@@ -9901,137 +9791,11 @@
},
"type": "array"
},
- "total_median_conversion_time": {
- "description": "Median total conversion time across all completers, computed breakdown-agnostically for the Steps viz header.",
- "type": ["number", "null"]
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": [
- "cache_key",
- "is_cached",
- "last_refresh",
- "next_allowed_client_refresh",
- "results",
- "timezone"
- ],
- "type": "object"
- },
- "CachedGroupsQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "cache_key": {
- "type": "string"
- },
- "cache_target_age": {
- "format": "date-time",
- "type": "string"
- },
- "calculation_trigger": {
- "description": "What triggered the calculation of the query, leave empty if user/immediate",
- "type": "string"
- },
- "columns": {
- "items": {},
- "type": "array"
- },
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hasMore": {
- "type": "boolean"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "is_cached": {
- "type": "boolean"
- },
- "kind": {
- "const": "GroupsQuery",
- "type": "string"
- },
- "last_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "limit": {
- "$ref": "#/definitions/integer"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "next_allowed_client_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "offset": {
- "$ref": "#/definitions/integer"
- },
- "query_metadata": {
- "type": "object"
- },
- "query_scan": {
- "$ref": "#/definitions/QueryScanSummary",
- "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "items": {},
- "type": "array"
- },
- "type": "array"
- },
- "timezone": {
- "type": "string"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "types": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "types": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
},
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
@@ -10364,7 +10128,7 @@
"required": ["cache_key", "is_cached", "last_refresh", "next_allowed_client_refresh", "timezone"],
"type": "object"
},
- "CachedLegacyExperimentQueryResponse": {
+ "CachedLifecycleQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -10378,50 +10142,29 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
},
- "insight": {
- "items": {
- "type": "object"
- },
- "type": "array"
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
},
"is_cached": {
"type": "boolean"
},
- "kind": {
- "const": "ExperimentQuery",
- "type": "string"
- },
"last_refresh": {
"format": "date-time",
"type": "string"
},
- "metric": {
- "$ref": "#/definitions/ExperimentMetric"
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
},
"next_allowed_client_refresh": {
"format": "date-time",
"type": "string"
},
- "p_value": {
- "type": "number"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
"query_metadata": {
"type": "object"
},
@@ -10433,61 +10176,63 @@
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
},
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
},
- "significant": {
- "type": "boolean"
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
},
- "stats_version": {
- "$ref": "#/definitions/integer"
+ "results": {
+ "items": {
+ "type": "object"
+ },
+ "type": "array"
},
"timezone": {
"type": "string"
},
- "variants": {
- "anyOf": [
- {
- "items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
- },
- "type": "array"
- },
- {
- "items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
- },
- "type": "array"
- }
- ]
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
},
"warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
},
"type": "array"
}
},
"required": [
"cache_key",
- "credible_intervals",
- "insight",
"is_cached",
- "kind",
"last_refresh",
- "metric",
"next_allowed_client_refresh",
- "p_value",
- "probability",
- "significance_code",
- "significant",
- "timezone",
- "variants"
+ "results",
+ "timezone"
],
"type": "object"
},
- "CachedLifecycleQueryResponse": {
+ "CachedLogsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -10501,10 +10246,19 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
+ "columns": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -10516,14 +10270,24 @@
"format": "date-time",
"type": "string"
},
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
+ "nextCursor": {
+ "description": "Cursor for fetching the next page of results",
+ "type": "string"
+ },
"next_allowed_client_refresh": {
"format": "date-time",
"type": "string"
},
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
"query_metadata": {
"type": "object"
},
@@ -10543,12 +10307,7 @@
"$ref": "#/definitions/ResolvedDateRangeResponse",
"description": "The date range used for the query"
},
- "results": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
+ "results": {},
"timezone": {
"type": "string"
},
@@ -10591,7 +10350,7 @@
],
"type": "object"
},
- "CachedLogsQueryResponse": {
+ "CachedMCPHarnessBreakdownQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -10605,17 +10364,116 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
- "columns": {
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "is_cached": {
+ "type": "boolean"
+ },
+ "last_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "next_allowed_client_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "query_metadata": {
+ "type": "object"
+ },
+ "query_scan": {
+ "$ref": "#/definitions/QueryScanSummary",
+ "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
"items": {
- "type": "string"
+ "$ref": "#/definitions/MCPHarnessBreakdownItem"
+ },
+ "type": "array"
+ },
+ "timezone": {
+ "type": "string"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
},
"type": "array"
},
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "cache_key",
+ "is_cached",
+ "last_refresh",
+ "next_allowed_client_refresh",
+ "results",
+ "timezone"
+ ],
+ "type": "object"
+ },
+ "CachedMCPMissingCapabilitiesQueryResponse": {
+ "additionalProperties": false,
+ "properties": {
+ "cache_key": {
+ "type": "string"
+ },
+ "cache_target_age": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "calculation_trigger": {
+ "description": "What triggered the calculation of the query, leave empty if user/immediate",
+ "type": "string"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "hasMore": {
+ "has_next": {
+ "description": "Whether more reports exist past this page.",
"type": "boolean"
},
"hogql": {
@@ -10629,24 +10487,14 @@
"format": "date-time",
"type": "string"
},
- "limit": {
- "$ref": "#/definitions/integer"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "nextCursor": {
- "description": "Cursor for fetching the next page of results",
- "type": "string"
- },
"next_allowed_client_refresh": {
"format": "date-time",
"type": "string"
},
- "offset": {
- "$ref": "#/definitions/integer"
- },
"query_metadata": {
"type": "object"
},
@@ -10666,7 +10514,12 @@
"$ref": "#/definitions/ResolvedDateRangeResponse",
"description": "The date range used for the query"
},
- "results": {},
+ "results": {
+ "items": {
+ "$ref": "#/definitions/MCPMissingCapabilitiesItem"
+ },
+ "type": "array"
+ },
"timezone": {
"type": "string"
},
@@ -10701,6 +10554,7 @@
},
"required": [
"cache_key",
+ "has_next",
"is_cached",
"last_refresh",
"next_allowed_client_refresh",
@@ -10709,7 +10563,7 @@
],
"type": "object"
},
- "CachedMCPHarnessBreakdownQueryResponse": {
+ "CachedMCPModelBreakdownQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -10727,6 +10581,10 @@
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "description": "Whether another page of individual model identifiers is available.",
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -10767,7 +10625,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPHarnessBreakdownItem"
+ "$ref": "#/definitions/MCPModelBreakdownItem"
},
"type": "array"
},
@@ -10813,7 +10671,7 @@
],
"type": "object"
},
- "CachedMCPMissingCapabilitiesQueryResponse": {
+ "CachedMCPProtocolVersionBreakdownQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -10831,10 +10689,6 @@
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "has_next": {
- "description": "Whether more reports exist past this page.",
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -10875,7 +10729,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPMissingCapabilitiesItem"
+ "$ref": "#/definitions/MCPProtocolVersionBreakdownItem"
},
"type": "array"
},
@@ -10913,7 +10767,6 @@
},
"required": [
"cache_key",
- "has_next",
"is_cached",
"last_refresh",
"next_allowed_client_refresh",
@@ -10922,7 +10775,7 @@
],
"type": "object"
},
- "CachedMCPModelBreakdownQueryResponse": {
+ "CachedMCPToolCallBreakdownQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -10940,10 +10793,110 @@
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "hasMore": {
- "description": "Whether another page of individual model identifiers is available.",
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "is_cached": {
"type": "boolean"
},
+ "last_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "next_allowed_client_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "query_metadata": {
+ "type": "object"
+ },
+ "query_scan": {
+ "$ref": "#/definitions/QueryScanSummary",
+ "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
+ "items": {
+ "$ref": "#/definitions/MCPToolCallBreakdownItem"
+ },
+ "type": "array"
+ },
+ "timezone": {
+ "type": "string"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
+ },
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "cache_key",
+ "is_cached",
+ "last_refresh",
+ "next_allowed_client_refresh",
+ "results",
+ "timezone"
+ ],
+ "type": "object"
+ },
+ "CachedMCPToolCallsAndErrorsQueryResponse": {
+ "additionalProperties": false,
+ "properties": {
+ "cache_key": {
+ "type": "string"
+ },
+ "cache_target_age": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "calculation_trigger": {
+ "description": "What triggered the calculation of the query, leave empty if user/immediate",
+ "type": "string"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -10984,7 +10937,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPModelBreakdownItem"
+ "$ref": "#/definitions/MCPToolCallsAndErrorsItem"
},
"type": "array"
},
@@ -11030,7 +10983,7 @@
],
"type": "object"
},
- "CachedMCPProtocolVersionBreakdownQueryResponse": {
+ "CachedMCPToolCategoriesQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11088,7 +11041,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPProtocolVersionBreakdownItem"
+ "$ref": "#/definitions/MCPToolCategoryItem"
},
"type": "array"
},
@@ -11134,7 +11087,7 @@
],
"type": "object"
},
- "CachedMCPToolCallBreakdownQueryResponse": {
+ "CachedMCPToolCategoryCountsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11192,7 +11145,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolCallBreakdownItem"
+ "$ref": "#/definitions/MCPToolCategoryCountItem"
},
"type": "array"
},
@@ -11238,7 +11191,7 @@
],
"type": "object"
},
- "CachedMCPToolCallsAndErrorsQueryResponse": {
+ "CachedMCPToolCategoryMapQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11296,7 +11249,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolCallsAndErrorsItem"
+ "$ref": "#/definitions/MCPToolCategoryMapItem"
},
"type": "array"
},
@@ -11342,7 +11295,7 @@
],
"type": "object"
},
- "CachedMCPToolCategoriesQueryResponse": {
+ "CachedMCPToolDailyStatsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11400,7 +11353,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolCategoryItem"
+ "$ref": "#/definitions/MCPToolDailyStatItem"
},
"type": "array"
},
@@ -11446,7 +11399,7 @@
],
"type": "object"
},
- "CachedMCPToolCategoryCountsQueryResponse": {
+ "CachedMCPToolDescriptionsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11504,7 +11457,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolCategoryCountItem"
+ "$ref": "#/definitions/MCPToolDescriptionItem"
},
"type": "array"
},
@@ -11550,7 +11503,7 @@
],
"type": "object"
},
- "CachedMCPToolCategoryMapQueryResponse": {
+ "CachedMCPToolFailureOccurrencesQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11608,7 +11561,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolCategoryMapItem"
+ "$ref": "#/definitions/MCPToolFailureOccurrenceItem"
},
"type": "array"
},
@@ -11654,7 +11607,7 @@
],
"type": "object"
},
- "CachedMCPToolDailyStatsQueryResponse": {
+ "CachedMCPToolFailuresQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11712,7 +11665,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolDailyStatItem"
+ "$ref": "#/definitions/MCPToolFailureItem"
},
"type": "array"
},
@@ -11758,7 +11711,7 @@
],
"type": "object"
},
- "CachedMCPToolDescriptionsQueryResponse": {
+ "CachedMCPToolNeighborsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11816,7 +11769,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolDescriptionItem"
+ "$ref": "#/definitions/MCPToolNeighborItem"
},
"type": "array"
},
@@ -11862,7 +11815,7 @@
],
"type": "object"
},
- "CachedMCPToolFailureOccurrencesQueryResponse": {
+ "CachedMCPToolQualityDailyStatsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -11920,7 +11873,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolFailureOccurrenceItem"
+ "$ref": "#/definitions/MCPToolQualityDailyStatItem"
},
"type": "array"
},
@@ -11966,7 +11919,7 @@
],
"type": "object"
},
- "CachedMCPToolFailuresQueryResponse": {
+ "CachedMCPToolQualityRowsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -12003,109 +11956,9 @@
"format": "date-time",
"type": "string"
},
- "query_metadata": {
- "type": "object"
- },
- "query_scan": {
- "$ref": "#/definitions/QueryScanSummary",
- "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "$ref": "#/definitions/MCPToolFailureItem"
- },
- "type": "array"
- },
- "timezone": {
- "type": "string"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": [
- "cache_key",
- "is_cached",
- "last_refresh",
- "next_allowed_client_refresh",
- "results",
- "timezone"
- ],
- "type": "object"
- },
- "CachedMCPToolNeighborsQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "cache_key": {
- "type": "string"
- },
- "cache_target_age": {
- "format": "date-time",
- "type": "string"
- },
- "calculation_trigger": {
- "description": "What triggered the calculation of the query, leave empty if user/immediate",
- "type": "string"
- },
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "is_cached": {
- "type": "boolean"
- },
- "last_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "next_allowed_client_refresh": {
- "format": "date-time",
- "type": "string"
+ "previousTotalSessions": {
+ "$ref": "#/definitions/integer",
+ "description": "The same total for the previous period, the denominator for each row's previous session share."
},
"query_metadata": {
"type": "object"
@@ -12128,7 +11981,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MCPToolNeighborItem"
+ "$ref": "#/definitions/MCPToolQualityRowItem"
},
"type": "array"
},
@@ -12142,109 +11995,13 @@
},
"type": "array"
},
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": [
- "cache_key",
- "is_cached",
- "last_refresh",
- "next_allowed_client_refresh",
- "results",
- "timezone"
- ],
- "type": "object"
- },
- "CachedMCPToolQualityDailyStatsQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "cache_key": {
- "type": "string"
- },
- "cache_target_age": {
- "format": "date-time",
- "type": "string"
- },
- "calculation_trigger": {
- "description": "What triggered the calculation of the query, leave empty if user/immediate",
- "type": "string"
- },
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "is_cached": {
- "type": "boolean"
- },
- "last_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "next_allowed_client_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "query_metadata": {
- "type": "object"
- },
- "query_scan": {
- "$ref": "#/definitions/QueryScanSummary",
- "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "$ref": "#/definitions/MCPToolQualityDailyStatItem"
- },
- "type": "array"
- },
- "timezone": {
- "type": "string"
+ "totalCount": {
+ "$ref": "#/definitions/integer",
+ "description": "Number of tools matching the date, category, and search filters."
},
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
+ "totalSessions": {
+ "$ref": "#/definitions/integer",
+ "description": "Distinct sessions with any tool call in the window, ignoring category and search filters. The denominator for each row's session share."
},
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
@@ -12273,131 +12030,15 @@
"is_cached",
"last_refresh",
"next_allowed_client_refresh",
+ "previousTotalSessions",
"results",
- "timezone"
+ "timezone",
+ "totalCount",
+ "totalSessions"
],
"type": "object"
},
- "CachedMCPToolQualityRowsQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "cache_key": {
- "type": "string"
- },
- "cache_target_age": {
- "format": "date-time",
- "type": "string"
- },
- "calculation_trigger": {
- "description": "What triggered the calculation of the query, leave empty if user/immediate",
- "type": "string"
- },
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "is_cached": {
- "type": "boolean"
- },
- "last_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "next_allowed_client_refresh": {
- "format": "date-time",
- "type": "string"
- },
- "previousTotalSessions": {
- "$ref": "#/definitions/integer",
- "description": "The same total for the previous period, the denominator for each row's previous session share."
- },
- "query_metadata": {
- "type": "object"
- },
- "query_scan": {
- "$ref": "#/definitions/QueryScanSummary",
- "description": "The rows and time of the run that produced these results, with its analysis once it is stored."
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "$ref": "#/definitions/MCPToolQualityRowItem"
- },
- "type": "array"
- },
- "timezone": {
- "type": "string"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "totalCount": {
- "$ref": "#/definitions/integer",
- "description": "Number of tools matching the date, category, and search filters."
- },
- "totalSessions": {
- "$ref": "#/definitions/integer",
- "description": "Distinct sessions with any tool call in the window, ignoring category and search filters. The denominator for each row's session share."
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": [
- "cache_key",
- "is_cached",
- "last_refresh",
- "next_allowed_client_refresh",
- "previousTotalSessions",
- "results",
- "timezone",
- "totalCount",
- "totalSessions"
- ],
- "type": "object"
- },
- "CachedMCPToolSampleIntentsQueryResponse": {
+ "CachedMCPToolSampleIntentsQueryResponse": {
"additionalProperties": false,
"properties": {
"cache_key": {
@@ -20504,149 +20145,81 @@
{
"additionalProperties": false,
"properties": {
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "expected_loss": {
- "type": "number"
- },
- "funnels_query": {
- "$ref": "#/definitions/FunnelsQuery"
- },
- "insight": {
+ "columns": {
"items": {
- "items": {
- "type": "object"
- },
- "type": "array"
+ "type": "string"
},
"type": "array"
},
- "kind": {
- "const": "ExperimentFunnelsQuery",
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
+ "hasMore": {
"type": "boolean"
},
- "stats_version": {
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
"$ref": "#/definitions/integer"
},
- "variants": {
- "items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
- },
- "type": "array"
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
},
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- "type": "array"
- }
- },
- "required": [
- "credible_intervals",
- "expected_loss",
- "insight",
- "kind",
- "probability",
- "significance_code",
- "significant",
- "variants"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "count_query": {
- "$ref": "#/definitions/TrendsQuery"
+ "offset": {
+ "$ref": "#/definitions/integer"
},
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
},
- "exposure_query": {
- "$ref": "#/definitions/TrendsQuery"
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
},
- "insight": {
+ "results": {
"items": {
- "type": "object"
+ "$ref": "#/definitions/LLMTrace"
},
"type": "array"
},
- "kind": {
- "const": "ExperimentTrendsQuery",
- "type": "string"
- },
- "p_value": {
- "type": "number"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
},
- "type": "object"
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
- "type": "boolean"
- },
- "stats_version": {
- "$ref": "#/definitions/integer"
+ "type": "array"
},
- "variants": {
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
},
"type": "array"
},
"warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
},
"type": "array"
}
},
- "required": [
- "credible_intervals",
- "insight",
- "kind",
- "p_value",
- "probability",
- "significance_code",
- "significant",
- "variants"
- ],
+ "required": ["results"],
"type": "object"
},
{
@@ -20733,9 +20306,7 @@
"additionalProperties": false,
"properties": {
"columns": {
- "items": {
- "type": "string"
- },
+ "items": {},
"type": "array"
},
"error": {
@@ -20772,9 +20343,7 @@
"description": "The date range used for the query"
},
"results": {
- "items": {
- "$ref": "#/definitions/LLMTrace"
- },
+ "items": {},
"type": "array"
},
"timings": {
@@ -20784,6 +20353,10 @@
},
"type": "array"
},
+ "types": {
+ "items": {},
+ "type": "array"
+ },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -20827,9 +20400,20 @@
"description": "Generated HogQL query.",
"type": "string"
},
+ "kind": {
+ "const": "AccountsQuery",
+ "type": "string"
+ },
"limit": {
"$ref": "#/definitions/integer"
},
+ "metricsResults": {
+ "description": "When `metrics` is set on the query, the aggregated values in the same order.",
+ "items": {
+ "type": ["number", "null"]
+ },
+ "type": "array"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
@@ -20850,7 +20434,10 @@
"description": "The date range used for the query"
},
"results": {
- "items": {},
+ "items": {
+ "items": {},
+ "type": "array"
+ },
"type": "array"
},
"timings": {
@@ -20861,7 +20448,9 @@
"type": "array"
},
"types": {
- "items": {},
+ "items": {
+ "type": "string"
+ },
"type": "array"
},
"used_data_warehouse_sources": {
@@ -20886,16 +20475,12 @@
"type": "array"
}
},
- "required": ["results"],
+ "required": ["columns", "hogql", "kind", "limit", "offset", "results", "types"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
- "columns": {
- "items": {},
- "type": "array"
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
@@ -20908,106 +20493,14 @@
"type": "string"
},
"kind": {
- "const": "AccountsQuery",
+ "const": "AccountsTableQuery",
"type": "string"
},
"limit": {
"$ref": "#/definitions/integer"
},
"metricsResults": {
- "description": "When `metrics` is set on the query, the aggregated values in the same order.",
- "items": {
- "type": ["number", "null"]
- },
- "type": "array"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "offset": {
- "$ref": "#/definitions/integer"
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "items": {},
- "type": "array"
- },
- "type": "array"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "types": {
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": ["columns", "hogql", "kind", "limit", "offset", "results", "types"],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hasMore": {
- "type": "boolean"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "kind": {
- "const": "AccountsTableQuery",
- "type": "string"
- },
- "limit": {
- "$ref": "#/definitions/integer"
- },
- "metricsResults": {
- "description": "Aggregated values in the same order as the requested metrics.",
+ "description": "Aggregated values in the same order as the requested metrics.",
"items": {
"type": ["number", "null"]
},
@@ -21254,12 +20747,6 @@
{
"$ref": "#/definitions/ErrorTrackingIssueCorrelationQuery"
},
- {
- "$ref": "#/definitions/ExperimentFunnelsQuery"
- },
- {
- "$ref": "#/definitions/ExperimentTrendsQuery"
- },
{
"$ref": "#/definitions/TracesQuery"
},
@@ -26427,6 +25914,7 @@
},
"ExperimentFunnelsQuery": {
"additionalProperties": false,
+ "description": "Stored shape of a legacy experiment metric. It no longer runs, so it is kept only to list and migrate legacy experiments.",
"properties": {
"experiment_id": {
"$ref": "#/definitions/integer"
@@ -26441,102 +25929,14 @@
"const": "ExperimentFunnelsQuery",
"type": "string"
},
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
"name": {
"type": "string"
},
- "response": {
- "$ref": "#/definitions/ExperimentFunnelsQueryResponse"
- },
- "tags": {
- "$ref": "#/definitions/QueryLogTags"
- },
"uuid": {
"type": "string"
- },
- "version": {
- "description": "version of the node, used for schema migrations",
- "type": "number"
}
},
- "required": ["funnels_query", "kind"],
- "type": "object"
- },
- "ExperimentFunnelsQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "expected_loss": {
- "type": "number"
- },
- "funnels_query": {
- "$ref": "#/definitions/FunnelsQuery"
- },
- "insight": {
- "items": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
- "type": "array"
- },
- "kind": {
- "const": "ExperimentFunnelsQuery",
- "type": "string"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
- "type": "boolean"
- },
- "stats_version": {
- "$ref": "#/definitions/integer"
- },
- "variants": {
- "items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- "type": "array"
- }
- },
- "required": [
- "kind",
- "insight",
- "variants",
- "probability",
- "significant",
- "significance_code",
- "expected_loss",
- "credible_intervals"
- ],
+ "required": ["kind", "funnels_query"],
"type": "object"
},
"ExperimentHoldoutType": {
@@ -27493,6 +26893,7 @@
},
"ExperimentTrendsQuery": {
"additionalProperties": false,
+ "description": "Stored shape of a legacy experiment metric. It no longer runs, so it is kept only to list and migrate legacy experiments.",
"properties": {
"count_query": {
"$ref": "#/definitions/TrendsQuery"
@@ -27510,125 +26911,118 @@
"const": "ExperimentTrendsQuery",
"type": "string"
},
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
"name": {
"type": "string"
},
- "response": {
- "$ref": "#/definitions/ExperimentTrendsQueryResponse"
- },
- "tags": {
- "$ref": "#/definitions/QueryLogTags"
- },
"uuid": {
"type": "string"
+ }
+ },
+ "required": ["kind", "count_query"],
+ "type": "object"
+ },
+ "ExperimentVariantFunnelsBaseStats": {
+ "additionalProperties": false,
+ "properties": {
+ "failure_count": {
+ "type": "number"
+ },
+ "key": {
+ "type": "string"
},
- "version": {
- "description": "version of the node, used for schema migrations",
+ "success_count": {
"type": "number"
}
},
- "required": ["count_query", "kind"],
+ "required": ["key", "success_count", "failure_count"],
"type": "object"
},
- "ExperimentTrendsQueryResponse": {
+ "ExperimentVariantResultBayesian": {
"additionalProperties": false,
"properties": {
- "count_query": {
- "$ref": "#/definitions/TrendsQuery"
+ "chance_to_win": {
+ "type": "number"
},
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
+ "covariate_sum": {
+ "type": "number"
},
- "exposure_query": {
- "$ref": "#/definitions/TrendsQuery"
+ "covariate_sum_product": {
+ "type": "number"
},
- "insight": {
+ "covariate_sum_squares": {
+ "type": "number"
+ },
+ "credible_interval": {
"items": {
- "type": "object"
+ "type": "number"
},
+ "maxItems": 2,
+ "minItems": 2,
"type": "array"
},
- "kind": {
- "const": "ExperimentTrendsQuery",
- "type": "string"
+ "denominator_sum": {
+ "type": "number"
},
- "p_value": {
+ "denominator_sum_squares": {
"type": "number"
},
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
+ "key": {
+ "type": "string"
},
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
+ "method": {
+ "const": "bayesian",
+ "type": "string"
+ },
+ "number_of_samples": {
+ "$ref": "#/definitions/integer"
+ },
+ "numerator_denominator_sum_product": {
+ "type": "number"
},
"significant": {
"type": "boolean"
},
- "stats_version": {
- "$ref": "#/definitions/integer"
- },
- "variants": {
+ "step_counts": {
"items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
+ "$ref": "#/definitions/integer"
},
"type": "array"
},
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
+ "step_sessions": {
"items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
+ "items": {
+ "$ref": "#/definitions/SessionData"
+ },
+ "type": "array"
},
"type": "array"
- }
- },
- "required": [
- "kind",
- "insight",
- "variants",
- "probability",
- "significant",
- "significance_code",
- "p_value",
- "credible_intervals"
- ],
- "type": "object"
- },
- "ExperimentVariantFunnelsBaseStats": {
- "additionalProperties": false,
- "properties": {
- "failure_count": {
- "type": "number"
},
- "key": {
- "type": "string"
+ "sum": {
+ "type": "number"
},
- "success_count": {
+ "sum_squares": {
"type": "number"
+ },
+ "validation_failures": {
+ "items": {
+ "$ref": "#/definitions/ExperimentStatsValidationFailure"
+ },
+ "type": "array"
}
},
- "required": ["key", "success_count", "failure_count"],
+ "required": ["key", "method", "number_of_samples", "sum", "sum_squares"],
"type": "object"
},
- "ExperimentVariantResultBayesian": {
+ "ExperimentVariantResultFrequentist": {
"additionalProperties": false,
"properties": {
- "chance_to_win": {
- "type": "number"
+ "confidence_interval": {
+ "items": {
+ "type": "number"
+ },
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
},
"covariate_sum": {
"type": "number"
@@ -27639,14 +27033,6 @@
"covariate_sum_squares": {
"type": "number"
},
- "credible_interval": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
"denominator_sum": {
"type": "number"
},
@@ -27657,89 +27043,16 @@
"type": "string"
},
"method": {
- "const": "bayesian",
+ "const": "frequentist",
"type": "string"
},
"number_of_samples": {
"$ref": "#/definitions/integer"
},
"numerator_denominator_sum_product": {
- "type": "number"
- },
- "significant": {
- "type": "boolean"
- },
- "step_counts": {
- "items": {
- "$ref": "#/definitions/integer"
- },
- "type": "array"
- },
- "step_sessions": {
- "items": {
- "items": {
- "$ref": "#/definitions/SessionData"
- },
- "type": "array"
- },
- "type": "array"
- },
- "sum": {
- "type": "number"
- },
- "sum_squares": {
- "type": "number"
- },
- "validation_failures": {
- "items": {
- "$ref": "#/definitions/ExperimentStatsValidationFailure"
- },
- "type": "array"
- }
- },
- "required": ["key", "method", "number_of_samples", "sum", "sum_squares"],
- "type": "object"
- },
- "ExperimentVariantResultFrequentist": {
- "additionalProperties": false,
- "properties": {
- "confidence_interval": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "covariate_sum": {
- "type": "number"
- },
- "covariate_sum_product": {
- "type": "number"
- },
- "covariate_sum_squares": {
- "type": "number"
- },
- "denominator_sum": {
- "type": "number"
- },
- "denominator_sum_squares": {
- "type": "number"
- },
- "key": {
- "type": "string"
- },
- "method": {
- "const": "frequentist",
- "type": "string"
- },
- "number_of_samples": {
- "$ref": "#/definitions/integer"
- },
- "numerator_denominator_sum_product": {
- "type": "number"
- },
- "p_value": {
+ "type": "number"
+ },
+ "p_value": {
"type": "number"
},
"significant": {
@@ -31915,88 +31228,6 @@
"required": ["type"],
"type": "object"
},
- "LegacyExperimentQueryResponse": {
- "additionalProperties": false,
- "properties": {
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "insight": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
- "kind": {
- "const": "ExperimentQuery",
- "type": "string"
- },
- "metric": {
- "$ref": "#/definitions/ExperimentMetric"
- },
- "p_value": {
- "type": "number"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
- "type": "boolean"
- },
- "stats_version": {
- "$ref": "#/definitions/integer"
- },
- "variants": {
- "anyOf": [
- {
- "items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
- },
- "type": "array"
- },
- {
- "items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
- },
- "type": "array"
- }
- ]
- },
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- "type": "array"
- }
- },
- "required": [
- "kind",
- "insight",
- "metric",
- "variants",
- "probability",
- "significant",
- "significance_code",
- "p_value",
- "credible_intervals"
- ],
- "type": "object"
- },
"LifecycleDataWarehouseNode": {
"additionalProperties": false,
"properties": {
@@ -43843,154 +43074,6 @@
"required": ["results"],
"type": "object"
},
- {
- "additionalProperties": false,
- "properties": {
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "expected_loss": {
- "type": "number"
- },
- "funnels_query": {
- "$ref": "#/definitions/FunnelsQuery"
- },
- "insight": {
- "items": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
- "type": "array"
- },
- "kind": {
- "const": "ExperimentFunnelsQuery",
- "type": "string"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
- "type": "boolean"
- },
- "stats_version": {
- "$ref": "#/definitions/integer"
- },
- "variants": {
- "items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- "type": "array"
- }
- },
- "required": [
- "kind",
- "insight",
- "variants",
- "probability",
- "significant",
- "significance_code",
- "expected_loss",
- "credible_intervals"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "count_query": {
- "$ref": "#/definitions/TrendsQuery"
- },
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "exposure_query": {
- "$ref": "#/definitions/TrendsQuery"
- },
- "insight": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
- "kind": {
- "const": "ExperimentTrendsQuery",
- "type": "string"
- },
- "p_value": {
- "type": "number"
- },
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
- },
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
- },
- "significant": {
- "type": "boolean"
- },
- "stats_version": {
- "$ref": "#/definitions/integer"
- },
- "variants": {
- "items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- "type": "array"
- }
- },
- "required": [
- "kind",
- "insight",
- "variants",
- "probability",
- "significant",
- "significance_code",
- "p_value",
- "credible_intervals"
- ],
- "type": "object"
- },
{
"additionalProperties": false,
"properties": {
@@ -44664,338 +43747,12 @@
"offset": {
"$ref": "#/definitions/integer"
},
- "preComputeIneligibleReason": {
- "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
- "type": "string"
- },
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {},
- "type": "array"
- },
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "types": {
- "items": {},
- "type": "array"
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": ["results"],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "preComputeIneligibleReason": {
- "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
- "type": "string"
- },
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "$ref": "#/definitions/WebVitalsPathBreakdownResult"
- },
- "maxItems": 1,
- "minItems": 1,
- "type": "array"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": ["results"],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hasMore": {
- "type": "boolean"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "limit": {
- "$ref": "#/definitions/integer"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "$ref": "#/definitions/PageURL"
- },
- "type": "array"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": ["results"],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "data": {
- "type": "object"
- },
- "error": {
- "$ref": "#/definitions/ExternalQueryError"
- },
- "status": {
- "$ref": "#/definitions/ExternalQueryStatus"
- }
- },
- "required": ["data", "status"],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
- },
- "query_status": {
- "$ref": "#/definitions/QueryStatus",
- "description": "Query status indicates whether next to the provided data, a query is still running."
- },
- "resolved_compare_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The resolved previous/comparison period date range, when comparing against another period"
- },
- "resolved_date_range": {
- "$ref": "#/definitions/ResolvedDateRangeResponse",
- "description": "The date range used for the query"
- },
- "results": {
- "items": {
- "$ref": "#/definitions/WebNotableChangeItem"
- },
- "type": "array"
- },
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
- },
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
- "items": {
- "$ref": "#/definitions/QueryTiming"
- },
- "type": "array"
- },
- "used_data_warehouse_sources": {
- "description": "Connector-synced data warehouse sources referenced by this query, if any.",
- "items": {
- "$ref": "#/definitions/DataWarehouseSourceUsage"
- },
- "type": "array"
- },
- "warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
- },
- {
- "$ref": "#/definitions/AccessControlFilterWarning"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": ["results"],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "columns": {
- "items": {},
- "type": "array"
- },
- "dataComputedAt": {
- "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
- "type": "string"
- },
- "error": {
- "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
- "type": "string"
- },
- "hasMore": {
- "type": "boolean"
- },
- "hogql": {
- "description": "Generated HogQL query.",
- "type": "string"
- },
- "limit": {
- "$ref": "#/definitions/integer"
- },
- "modifiers": {
- "$ref": "#/definitions/HogQLQueryModifiers",
- "description": "Modifiers used when performing the query"
- },
- "offset": {
- "$ref": "#/definitions/integer"
- },
- "precomputeNotReady": {
- "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
- "type": "boolean"
+ "preComputeIneligibleReason": {
+ "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
+ "type": "string"
+ },
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45010,12 +43767,7 @@
"description": "The date range used for the query"
},
"results": {
- "items": {
- "items": {
- "$ref": "#/definitions/MarketingAnalyticsItem"
- },
- "type": "array"
- },
+ "items": {},
"type": "array"
},
"samplingRate": {
@@ -45060,10 +43812,6 @@
{
"additionalProperties": false,
"properties": {
- "dataComputedAt": {
- "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
- "type": "string"
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
@@ -45076,9 +43824,12 @@
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "precomputeNotReady": {
- "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
- "type": "boolean"
+ "preComputeIneligibleReason": {
+ "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
+ "type": "string"
+ },
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45093,13 +43844,12 @@
"description": "The date range used for the query"
},
"results": {
- "additionalProperties": {
- "$ref": "#/definitions/MarketingAnalyticsItem"
+ "items": {
+ "$ref": "#/definitions/WebVitalsPathBreakdownResult"
},
- "type": "object"
- },
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
+ "maxItems": 1,
+ "minItems": 1,
+ "type": "array"
},
"timings": {
"description": "Measured timings for different parts of the query generation process",
@@ -45136,14 +43886,6 @@
{
"additionalProperties": false,
"properties": {
- "allowsMultipleConversionsPerVisitor": {
- "description": "Whether this result counted a repeat converter's every conversion, after resolving the query's null against the goal's math. The rate columns are a true share only when this is false, so the table reads it to label them.",
- "type": "boolean"
- },
- "attributionWindowDays": {
- "$ref": "#/definitions/integer",
- "description": "The team's configured attribution window, for the tooltips."
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
@@ -45151,10 +43893,6 @@
"hasMore": {
"type": "boolean"
},
- "hasValue": {
- "description": "Whether the goal is revenue-bearing, which gates the value columns.",
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -45162,19 +43900,12 @@
"limit": {
"$ref": "#/definitions/integer"
},
- "models": {
- "description": "Model order for the column groups.",
- "items": {
- "$ref": "#/definitions/AttributionMode"
- },
- "type": "array"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "offset": {
- "$ref": "#/definitions/integer"
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45190,7 +43921,7 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MarketingAnalyticsAttributionRow"
+ "$ref": "#/definitions/PageURL"
},
"type": "array"
},
@@ -45201,14 +43932,6 @@
},
"type": "array"
},
- "totalConversions": {
- "$ref": "#/definitions/integer",
- "description": "Total conversions in range, so the footer can say \"N of M\"."
- },
- "unattributedConversions": {
- "$ref": "#/definitions/integer",
- "description": "Conversions with no touchpoint in the window. Reported in the footer, not in any row."
- },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -45231,52 +43954,42 @@
"type": "array"
}
},
- "required": [
- "allowsMultipleConversionsPerVisitor",
- "attributionWindowDays",
- "hasValue",
- "models",
- "results",
- "totalConversions",
- "unattributedConversions"
- ],
+ "required": ["results"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
- "attributedConversions": {
- "$ref": "#/definitions/integer",
- "description": "Conversions with at least one in-window touchpoint. The share denominator — deliberately unfiltered by min/maxTouchpoints so shares stay comparable across filter values."
+ "data": {
+ "type": "object"
},
- "attributionWindowDays": {
- "$ref": "#/definitions/integer",
- "description": "The attribution window actually used, for the tooltips."
+ "error": {
+ "$ref": "#/definitions/ExternalQueryError"
},
+ "status": {
+ "$ref": "#/definitions/ExternalQueryStatus"
+ }
+ },
+ "required": ["data", "status"],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "hasMore": {
- "type": "boolean"
- },
- "hasValue": {
- "description": "Whether the goal is revenue-bearing, which gates the value column.",
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
- "limit": {
- "$ref": "#/definitions/integer"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "offset": {
- "$ref": "#/definitions/integer"
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45292,10 +44005,13 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MarketingAnalyticsAttributionPathRow"
+ "$ref": "#/definitions/WebNotableChangeItem"
},
"type": "array"
},
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
+ },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -45303,10 +44019,6 @@
},
"type": "array"
},
- "totalConversions": {
- "$ref": "#/definitions/integer",
- "description": "All conversions in range, before the touchpoint-count filter."
- },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -45329,47 +44041,44 @@
"type": "array"
}
},
- "required": [
- "attributedConversions",
- "attributionWindowDays",
- "hasValue",
- "results",
- "totalConversions"
- ],
+ "required": ["results"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "dataComputedAt": {
+ "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
+ "type": "string"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
- "interval": {
- "$ref": "#/definitions/MarketingAnalyticsRetentionInterval"
- },
- "intervalCount": {
- "$ref": "#/definitions/integer",
- "description": "Column count. Every row's values array has this length."
- },
- "labels": {
- "description": "Column headers, e.g. ['Week 0', 'Week 1', ...].",
- "items": {
- "type": "string"
- },
- "type": "array"
+ "limit": {
+ "$ref": "#/definitions/integer"
},
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "otherBreakdownCount": {
- "$ref": "#/definitions/integer",
- "description": "How many breakdown values were folded into 'Other', so the table can say so."
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
+ "precomputeNotReady": {
+ "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
+ "type": "boolean"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45385,16 +44094,15 @@
},
"results": {
"items": {
- "$ref": "#/definitions/MarketingAnalyticsRetentionRow"
+ "items": {
+ "$ref": "#/definitions/MarketingAnalyticsItem"
+ },
+ "type": "array"
},
"type": "array"
},
- "summary": {
- "description": "Only populated in summary mode. Rates use the corresponding eligible population.",
- "items": {
- "$ref": "#/definitions/MarketingAnalyticsRetentionSummaryRow"
- },
- "type": "array"
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
},
"timings": {
"description": "Measured timings for different parts of the query generation process",
@@ -45403,13 +44111,9 @@
},
"type": "array"
},
- "totalCohortSize": {
- "$ref": "#/definitions/integer",
- "description": "Distinct persons acquired across every cohort and breakdown value."
- },
- "truncatedCohorts": {
- "$ref": "#/definitions/integer",
- "description": "Older cohorts dropped to bound the matrix. Non-zero means the table covers less than the date range the filter bar shows, so the table has to say so."
+ "types": {
+ "items": {},
+ "type": "array"
},
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
@@ -45433,20 +44137,16 @@
"type": "array"
}
},
- "required": [
- "interval",
- "intervalCount",
- "labels",
- "otherBreakdownCount",
- "results",
- "totalCohortSize",
- "truncatedCohorts"
- ],
+ "required": ["results"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
+ "dataComputedAt": {
+ "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
+ "type": "string"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
@@ -45459,35 +44159,10 @@
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "placementUnavailable": {
+ "precomputeNotReady": {
+ "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
"type": "boolean"
},
- "posthogAttributionMode": {
- "anyOf": [
- {
- "$ref": "#/definitions/AttributionMode"
- },
- {
- "type": "null"
- }
- ]
- },
- "posthogConversionGoals": {
- "anyOf": [
- {
- "items": {
- "$ref": "#/definitions/MarketingAnalyticsSearchConversionGoal"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ]
- },
- "posthogConversionsWarning": {
- "type": ["string", "null"]
- },
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
@@ -45501,10 +44176,13 @@
"description": "The date range used for the query"
},
"results": {
- "items": {
- "$ref": "#/definitions/MarketingAnalyticsSearchRow"
+ "additionalProperties": {
+ "$ref": "#/definitions/MarketingAnalyticsItem"
},
- "type": "array"
+ "type": "object"
+ },
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
},
"timings": {
"description": "Measured timings for different parts of the query generation process",
@@ -45538,19 +44216,16 @@
"required": ["results"],
"type": "object"
},
- {
- "properties": {},
- "type": "object"
- },
- {
- "not": {}
- },
{
"additionalProperties": false,
"properties": {
- "columns": {
- "items": {},
- "type": "array"
+ "allowsMultipleConversionsPerVisitor": {
+ "description": "Whether this result counted a repeat converter's every conversion, after resolving the query's null against the goal's math. The rate columns are a true share only when this is false, so the table reads it to label them.",
+ "type": "boolean"
+ },
+ "attributionWindowDays": {
+ "$ref": "#/definitions/integer",
+ "description": "The team's configured attribution window, for the tooltips."
},
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
@@ -45559,6 +44234,10 @@
"hasMore": {
"type": "boolean"
},
+ "hasValue": {
+ "description": "Whether the goal is revenue-bearing, which gates the value columns.",
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -45566,14 +44245,17 @@
"limit": {
"$ref": "#/definitions/integer"
},
+ "models": {
+ "description": "Model order for the column groups.",
+ "items": {
+ "$ref": "#/definitions/AttributionMode"
+ },
+ "type": "array"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "nextCursor": {
- "description": "Cursor for fetching the next page of results",
- "type": "string"
- },
"offset": {
"$ref": "#/definitions/integer"
},
@@ -45591,8 +44273,7 @@
},
"results": {
"items": {
- "items": {},
- "type": "array"
+ "$ref": "#/definitions/MarketingAnalyticsAttributionRow"
},
"type": "array"
},
@@ -45603,11 +44284,13 @@
},
"type": "array"
},
- "types": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "totalConversions": {
+ "$ref": "#/definitions/integer",
+ "description": "Total conversions in range, so the footer can say \"N of M\"."
+ },
+ "unattributedConversions": {
+ "$ref": "#/definitions/integer",
+ "description": "Conversions with no touchpoint in the window. Reported in the footer, not in any row."
},
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
@@ -45631,15 +44314,27 @@
"type": "array"
}
},
- "required": ["columns", "hogql", "results", "types"],
+ "required": [
+ "allowsMultipleConversionsPerVisitor",
+ "attributionWindowDays",
+ "hasValue",
+ "models",
+ "results",
+ "totalConversions",
+ "unattributedConversions"
+ ],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
- "columns": {
- "items": {},
- "type": "array"
+ "attributedConversions": {
+ "$ref": "#/definitions/integer",
+ "description": "Conversions with at least one in-window touchpoint. The share denominator — deliberately unfiltered by min/maxTouchpoints so shares stay comparable across filter values."
+ },
+ "attributionWindowDays": {
+ "$ref": "#/definitions/integer",
+ "description": "The attribution window actually used, for the tooltips."
},
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
@@ -45648,6 +44343,10 @@
"hasMore": {
"type": "boolean"
},
+ "hasValue": {
+ "description": "Whether the goal is revenue-bearing, which gates the value column.",
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
@@ -45655,9 +44354,6 @@
"limit": {
"$ref": "#/definitions/integer"
},
- "missing_actors_count": {
- "$ref": "#/definitions/integer"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
@@ -45679,8 +44375,7 @@
},
"results": {
"items": {
- "items": {},
- "type": "array"
+ "$ref": "#/definitions/MarketingAnalyticsAttributionPathRow"
},
"type": "array"
},
@@ -45691,11 +44386,9 @@
},
"type": "array"
},
- "types": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "totalConversions": {
+ "$ref": "#/definitions/integer",
+ "description": "All conversions in range, before the touchpoint-count filter."
},
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
@@ -45719,40 +44412,47 @@
"type": "array"
}
},
- "required": ["columns", "hogql", "limit", "offset", "results"],
+ "required": [
+ "attributedConversions",
+ "attributionWindowDays",
+ "hasValue",
+ "results",
+ "totalConversions"
+ ],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
- "columns": {
- "items": {},
- "type": "array"
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "hasMore": {
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
- "kind": {
- "const": "GroupsQuery",
- "type": "string"
+ "interval": {
+ "$ref": "#/definitions/MarketingAnalyticsRetentionInterval"
},
- "limit": {
- "$ref": "#/definitions/integer"
+ "intervalCount": {
+ "$ref": "#/definitions/integer",
+ "description": "Column count. Every row's values array has this length."
+ },
+ "labels": {
+ "description": "Column headers, e.g. ['Week 0', 'Week 1', ...].",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
},
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "offset": {
- "$ref": "#/definitions/integer"
+ "otherBreakdownCount": {
+ "$ref": "#/definitions/integer",
+ "description": "How many breakdown values were folded into 'Other', so the table can say so."
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45768,24 +44468,32 @@
},
"results": {
"items": {
- "items": {},
- "type": "array"
+ "$ref": "#/definitions/MarketingAnalyticsRetentionRow"
},
"type": "array"
},
- "timings": {
- "description": "Measured timings for different parts of the query generation process",
+ "summary": {
+ "description": "Only populated in summary mode. Rates use the corresponding eligible population.",
"items": {
- "$ref": "#/definitions/QueryTiming"
+ "$ref": "#/definitions/MarketingAnalyticsRetentionSummaryRow"
},
"type": "array"
},
- "types": {
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
"items": {
- "type": "string"
+ "$ref": "#/definitions/QueryTiming"
},
"type": "array"
},
+ "totalCohortSize": {
+ "$ref": "#/definitions/integer",
+ "description": "Distinct persons acquired across every cohort and breakdown value."
+ },
+ "truncatedCohorts": {
+ "$ref": "#/definitions/integer",
+ "description": "Older cohorts dropped to bound the matrix. Non-zero means the table covers less than the date range the filter bar shows, so the table has to say so."
+ },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -45808,56 +44516,60 @@
"type": "array"
}
},
- "required": ["columns", "hogql", "kind", "limit", "offset", "results", "types"],
+ "required": [
+ "interval",
+ "intervalCount",
+ "labels",
+ "otherBreakdownCount",
+ "results",
+ "totalCohortSize",
+ "truncatedCohorts"
+ ],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
- "clickhouse": {
- "description": "Executed ClickHouse query",
- "type": "string"
- },
- "columns": {
- "description": "Returned columns",
- "items": {},
- "type": "array"
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "explain": {
- "description": "Query explanation output",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "hasMore": {
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
- "limit": {
- "$ref": "#/definitions/integer"
- },
- "metadata": {
- "$ref": "#/definitions/HogQLMetadataResponse",
- "description": "Query metadata output"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "offset": {
- "$ref": "#/definitions/integer"
+ "placementUnavailable": {
+ "type": "boolean"
},
- "query": {
- "description": "Input query string",
- "type": "string"
+ "posthogAttributionMode": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AttributionMode"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "posthogConversionGoals": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/definitions/MarketingAnalyticsSearchConversionGoal"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "posthogConversionsWarning": {
+ "type": ["string", "null"]
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45872,7 +44584,9 @@
"description": "The date range used for the query"
},
"results": {
- "items": {},
+ "items": {
+ "$ref": "#/definitions/MarketingAnalyticsSearchRow"
+ },
"type": "array"
},
"timings": {
@@ -45882,11 +44596,6 @@
},
"type": "array"
},
- "types": {
- "description": "Types of returned columns",
- "items": {},
- "type": "array"
- },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -45895,7 +44604,7 @@
"type": "array"
},
"warnings": {
- "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
"anyOf": [
{
@@ -45912,33 +44621,44 @@
"required": ["results"],
"type": "object"
},
+ {
+ "properties": {},
+ "type": "object"
+ },
+ {
+ "not": {}
+ },
{
"additionalProperties": false,
"properties": {
- "dateFrom": {
- "type": "string"
- },
- "dateTo": {
- "type": "string"
+ "columns": {
+ "items": {},
+ "type": "array"
},
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "preComputeIneligibleReason": {
- "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
+ "nextCursor": {
+ "description": "Cursor for fetching the next page of results",
"type": "string"
},
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
+ "offset": {
+ "$ref": "#/definitions/integer"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -45954,13 +44674,11 @@
},
"results": {
"items": {
- "$ref": "#/definitions/WebOverviewItem"
+ "items": {},
+ "type": "array"
},
"type": "array"
},
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
- },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -45968,6 +44686,12 @@
},
"type": "array"
},
+ "types": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -45990,7 +44714,7 @@
"type": "array"
}
},
- "required": ["results"],
+ "required": ["columns", "hogql", "results", "types"],
"type": "object"
},
{
@@ -46014,6 +44738,9 @@
"limit": {
"$ref": "#/definitions/integer"
},
+ "missing_actors_count": {
+ "$ref": "#/definitions/integer"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
@@ -46021,17 +44748,6 @@
"offset": {
"$ref": "#/definitions/integer"
},
- "preComputeIneligibleReason": {
- "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
- "type": "string"
- },
- "preComputeStale": {
- "description": "Whether a lazy-precompute read was served from expired-within-grace (stale) jobs instead of recomputing inline.",
- "type": "boolean"
- },
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
- },
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
@@ -46045,12 +44761,12 @@
"description": "The date range used for the query"
},
"results": {
- "items": {},
+ "items": {
+ "items": {},
+ "type": "array"
+ },
"type": "array"
},
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
- },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46059,7 +44775,9 @@
"type": "array"
},
"types": {
- "items": {},
+ "items": {
+ "type": "string"
+ },
"type": "array"
},
"used_data_warehouse_sources": {
@@ -46084,7 +44802,7 @@
"type": "array"
}
},
- "required": ["results"],
+ "required": ["columns", "hogql", "limit", "offset", "results"],
"type": "object"
},
{
@@ -46105,6 +44823,10 @@
"description": "Generated HogQL query.",
"type": "string"
},
+ "kind": {
+ "const": "GroupsQuery",
+ "type": "string"
+ },
"limit": {
"$ref": "#/definitions/integer"
},
@@ -46128,12 +44850,12 @@
"description": "The date range used for the query"
},
"results": {
- "items": {},
+ "items": {
+ "items": {},
+ "type": "array"
+ },
"type": "array"
},
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
- },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46142,7 +44864,9 @@
"type": "array"
},
"types": {
- "items": {},
+ "items": {
+ "type": "string"
+ },
"type": "array"
},
"used_data_warehouse_sources": {
@@ -46167,13 +44891,18 @@
"type": "array"
}
},
- "required": ["results"],
+ "required": ["columns", "hogql", "kind", "limit", "offset", "results", "types"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
+ "clickhouse": {
+ "description": "Executed ClickHouse query",
+ "type": "string"
+ },
"columns": {
+ "description": "Returned columns",
"items": {},
"type": "array"
},
@@ -46181,6 +44910,13 @@
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "explain": {
+ "description": "Query explanation output",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
"hasMore": {
"type": "boolean"
},
@@ -46191,6 +44927,10 @@
"limit": {
"$ref": "#/definitions/integer"
},
+ "metadata": {
+ "$ref": "#/definitions/HogQLMetadataResponse",
+ "description": "Query metadata output"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
@@ -46198,6 +44938,10 @@
"offset": {
"$ref": "#/definitions/integer"
},
+ "query": {
+ "description": "Input query string",
+ "type": "string"
+ },
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
@@ -46222,6 +44966,7 @@
"type": "array"
},
"types": {
+ "description": "Types of returned columns",
"items": {},
"type": "array"
},
@@ -46232,6 +44977,87 @@
},
"type": "array"
},
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "dateFrom": {
+ "type": "string"
+ },
+ "dateTo": {
+ "type": "string"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "preComputeIneligibleReason": {
+ "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
+ "type": "string"
+ },
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
+ "items": {
+ "$ref": "#/definitions/WebOverviewItem"
+ },
+ "type": "array"
+ },
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
+ },
"warnings": {
"description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
@@ -46282,6 +45108,10 @@
"description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
"type": "string"
},
+ "preComputeStale": {
+ "description": "Whether a lazy-precompute read was served from expired-within-grace (stale) jobs instead of recomputing inline.",
+ "type": "boolean"
+ },
"preComputeStrategy": {
"$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
},
@@ -46343,24 +45173,30 @@
{
"additionalProperties": false,
"properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "preComputeIneligibleReason": {
- "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
- "type": "string"
- },
- "preComputeStrategy": {
- "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
+ "offset": {
+ "$ref": "#/definitions/integer"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -46375,13 +45211,12 @@
"description": "The date range used for the query"
},
"results": {
- "items": {
- "$ref": "#/definitions/WebVitalsPathBreakdownResult"
- },
- "maxItems": 1,
- "minItems": 1,
+ "items": {},
"type": "array"
},
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
+ },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46389,6 +45224,10 @@
},
"type": "array"
},
+ "types": {
+ "items": {},
+ "type": "array"
+ },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -46454,7 +45293,10 @@
"$ref": "#/definitions/ResolvedDateRangeResponse",
"description": "The date range used for the query"
},
- "results": {},
+ "results": {
+ "items": {},
+ "type": "array"
+ },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46519,6 +45361,13 @@
"offset": {
"$ref": "#/definitions/integer"
},
+ "preComputeIneligibleReason": {
+ "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
+ "type": "string"
+ },
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
+ },
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
@@ -46532,12 +45381,12 @@
"description": "The date range used for the query"
},
"results": {
- "items": {
- "items": {},
- "type": "array"
- },
+ "items": {},
"type": "array"
},
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
+ },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46546,8 +45395,80 @@
"type": "array"
},
"types": {
+ "items": {},
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
- "type": "string"
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
+ },
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "preComputeIneligibleReason": {
+ "description": "Why a live response skipped precompute: the eligibility-gate reason that refused it. Unset when the query was eligible.",
+ "type": "string"
+ },
+ "preComputeStrategy": {
+ "$ref": "#/definitions/WebAnalyticsPreComputeStrategy"
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
+ "items": {
+ "$ref": "#/definitions/WebVitalsPathBreakdownResult"
+ },
+ "maxItems": 1,
+ "minItems": 1,
+ "type": "array"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
},
"type": "array"
},
@@ -46573,7 +45494,7 @@
"type": "array"
}
},
- "required": ["columns", "hogql", "results", "types"],
+ "required": ["results"],
"type": "object"
},
{
@@ -46583,10 +45504,6 @@
"items": {},
"type": "array"
},
- "dataComputedAt": {
- "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
- "type": "string"
- },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
@@ -46608,10 +45525,6 @@
"offset": {
"$ref": "#/definitions/integer"
},
- "precomputeNotReady": {
- "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
- "type": "boolean"
- },
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
@@ -46624,18 +45537,7 @@
"$ref": "#/definitions/ResolvedDateRangeResponse",
"description": "The date range used for the query"
},
- "results": {
- "items": {
- "items": {
- "$ref": "#/definitions/MarketingAnalyticsItem"
- },
- "type": "array"
- },
- "type": "array"
- },
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
- },
+ "results": {},
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46675,25 +45577,30 @@
{
"additionalProperties": false,
"properties": {
- "dataComputedAt": {
- "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
- "type": "string"
+ "columns": {
+ "items": {},
+ "type": "array"
},
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
+ "hasMore": {
+ "type": "boolean"
+ },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "precomputeNotReady": {
- "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
- "type": "boolean"
+ "offset": {
+ "$ref": "#/definitions/integer"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -46708,13 +45615,11 @@
"description": "The date range used for the query"
},
"results": {
- "additionalProperties": {
- "$ref": "#/definitions/MarketingAnalyticsItem"
+ "items": {
+ "items": {},
+ "type": "array"
},
- "type": "object"
- },
- "samplingRate": {
- "$ref": "#/definitions/SamplingRate"
+ "type": "array"
},
"timings": {
"description": "Measured timings for different parts of the query generation process",
@@ -46723,6 +45628,12 @@
},
"type": "array"
},
+ "types": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -46745,18 +45656,20 @@
"type": "array"
}
},
- "required": ["results"],
+ "required": ["columns", "hogql", "results", "types"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"columns": {
- "items": {
- "type": "string"
- },
+ "items": {},
"type": "array"
},
+ "dataComputedAt": {
+ "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
+ "type": "string"
+ },
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
@@ -46778,6 +45691,10 @@
"offset": {
"$ref": "#/definitions/integer"
},
+ "precomputeNotReady": {
+ "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
+ "type": "boolean"
+ },
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
@@ -46792,10 +45709,16 @@
},
"results": {
"items": {
- "$ref": "#/definitions/ErrorTrackingIssue"
+ "items": {
+ "$ref": "#/definitions/MarketingAnalyticsItem"
+ },
+ "type": "array"
},
"type": "array"
},
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
+ },
"timings": {
"description": "Measured timings for different parts of the query generation process",
"items": {
@@ -46803,6 +45726,10 @@
},
"type": "array"
},
+ "types": {
+ "items": {},
+ "type": "array"
+ },
"used_data_warehouse_sources": {
"description": "Connector-synced data warehouse sources referenced by this query, if any.",
"items": {
@@ -46831,32 +45758,25 @@
{
"additionalProperties": false,
"properties": {
- "columns": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "dataComputedAt": {
+ "description": "ISO timestamp of the oldest precompute window backing this result — surfaced as \"data as of X\".",
+ "type": "string"
},
"error": {
"description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "hasMore": {
- "type": "boolean"
- },
"hogql": {
"description": "Generated HogQL query.",
"type": "string"
},
- "limit": {
- "$ref": "#/definitions/integer"
- },
"modifiers": {
"$ref": "#/definitions/HogQLQueryModifiers",
"description": "Modifiers used when performing the query"
},
- "offset": {
- "$ref": "#/definitions/integer"
+ "precomputeNotReady": {
+ "description": "True when a conversion goal's precompute has not been warmed for this window yet — the UI shows a \"computing\" state rather than empty results. Marketing analytics serves exclusively from precompute.",
+ "type": "boolean"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
@@ -46871,10 +45791,13 @@
"description": "The date range used for the query"
},
"results": {
- "items": {
- "$ref": "#/definitions/ErrorTrackingCorrelatedIssue"
+ "additionalProperties": {
+ "$ref": "#/definitions/MarketingAnalyticsItem"
},
- "type": "array"
+ "type": "object"
+ },
+ "samplingRate": {
+ "$ref": "#/definitions/SamplingRate"
},
"timings": {
"description": "Measured timings for different parts of the query generation process",
@@ -46911,149 +45834,161 @@
{
"additionalProperties": false,
"properties": {
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "expected_loss": {
- "type": "number"
- },
- "funnels_query": {
- "$ref": "#/definitions/FunnelsQuery"
- },
- "insight": {
+ "columns": {
"items": {
- "items": {
- "type": "object"
- },
- "type": "array"
+ "type": "string"
},
"type": "array"
},
- "kind": {
- "const": "ExperimentFunnelsQuery",
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
+ "hasMore": {
+ "type": "boolean"
},
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
},
- "significant": {
- "type": "boolean"
+ "limit": {
+ "$ref": "#/definitions/integer"
},
- "stats_version": {
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
"$ref": "#/definitions/integer"
},
- "variants": {
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
"items": {
- "$ref": "#/definitions/ExperimentVariantFunnelsBaseStats"
+ "$ref": "#/definitions/ErrorTrackingIssue"
+ },
+ "type": "array"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
},
"type": "array"
},
"warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
},
"type": "array"
}
},
- "required": [
- "credible_intervals",
- "expected_loss",
- "insight",
- "kind",
- "probability",
- "significance_code",
- "significant",
- "variants"
- ],
+ "required": ["results"],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
- "count_query": {
- "$ref": "#/definitions/TrendsQuery"
- },
- "credible_intervals": {
- "additionalProperties": {
- "items": {
- "type": "number"
- },
- "maxItems": 2,
- "minItems": 2,
- "type": "array"
- },
- "type": "object"
- },
- "exposure_query": {
- "$ref": "#/definitions/TrendsQuery"
- },
- "insight": {
+ "columns": {
"items": {
- "type": "object"
+ "type": "string"
},
"type": "array"
},
- "kind": {
- "const": "ExperimentTrendsQuery",
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
"type": "string"
},
- "p_value": {
- "type": "number"
+ "hasMore": {
+ "type": "boolean"
},
- "probability": {
- "additionalProperties": {
- "type": "number"
- },
- "type": "object"
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
},
- "significance_code": {
- "$ref": "#/definitions/ExperimentSignificanceCode"
+ "limit": {
+ "$ref": "#/definitions/integer"
},
- "significant": {
- "type": "boolean"
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
},
- "stats_version": {
+ "offset": {
"$ref": "#/definitions/integer"
},
- "variants": {
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
"items": {
- "$ref": "#/definitions/ExperimentVariantTrendsBaseStats"
+ "$ref": "#/definitions/ErrorTrackingCorrelatedIssue"
+ },
+ "type": "array"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
},
"type": "array"
},
"warnings": {
- "description": "Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics.",
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
"items": {
- "$ref": "#/definitions/DataWarehouseSyncWarning"
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
},
"type": "array"
}
},
- "required": [
- "credible_intervals",
- "insight",
- "kind",
- "p_value",
- "probability",
- "significance_code",
- "significant",
- "variants"
- ],
+ "required": ["results"],
"type": "object"
},
{
@@ -51301,12 +50236,6 @@
{
"$ref": "#/definitions/ErrorTrackingIssueCorrelationQuery"
},
- {
- "$ref": "#/definitions/ExperimentFunnelsQuery"
- },
- {
- "$ref": "#/definitions/ExperimentTrendsQuery"
- },
{
"$ref": "#/definitions/ExperimentQuery"
},
@@ -60315,29 +59244,6 @@
},
"type": "object"
},
- "isExperimentFunnelsQuery": {
- "$comment": "(\n query: ExperimentTrendsQuery | ExperimentFunnelsQuery) => query is ExperimentFunnelsQuery",
- "properties": {
- "namedArgs": {
- "additionalProperties": false,
- "properties": {
- "query": {
- "anyOf": [
- {
- "$ref": "#/definitions/ExperimentTrendsQuery"
- },
- {
- "$ref": "#/definitions/ExperimentFunnelsQuery"
- }
- ]
- }
- },
- "required": ["query"],
- "type": "object"
- }
- },
- "type": "object"
- },
"isExperimentMeanMetric": {
"$comment": "(metric: ExperimentMetric) => metric is ExperimentMeanMetric",
"properties": {
@@ -60386,29 +59292,6 @@
},
"type": "object"
},
- "isExperimentTrendsQuery": {
- "$comment": "(\n query: ExperimentTrendsQuery | ExperimentFunnelsQuery) => query is ExperimentTrendsQuery",
- "properties": {
- "namedArgs": {
- "additionalProperties": false,
- "properties": {
- "query": {
- "anyOf": [
- {
- "$ref": "#/definitions/ExperimentTrendsQuery"
- },
- {
- "$ref": "#/definitions/ExperimentFunnelsQuery"
- }
- ]
- }
- },
- "required": ["query"],
- "type": "object"
- }
- },
- "type": "object"
- },
"non_negative_integer": {
"minimum": 0,
"type": "integer"
diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.ts
index 78398ced8d54..4ca5c8581486 100644
--- a/frontend/src/queries/schema/schema-general.ts
+++ b/frontend/src/queries/schema/schema-general.ts
@@ -276,8 +276,6 @@ export type AnyDataNode =
| TraceSpansAggregationQuery
| TraceSpansTreeQuery
| TraceSpansAttributeBreakdownQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| CalendarHeatmapQuery
| RecordingsQuery
| TracesQuery
@@ -340,8 +338,6 @@ export type QuerySchema =
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -1381,8 +1377,6 @@ export type DataTableNodeSourceUnion =
| MarketingAnalyticsAggregatedQuery
| ErrorTrackingQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| TracesQuery
| TraceQuery
| SessionQuery
@@ -1416,8 +1410,6 @@ export interface DataTableNode
| MarketingAnalyticsAggregatedQuery
| ErrorTrackingQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| TracesQuery
| SessionQuery
| EndpointsUsageTableQuery
@@ -5688,42 +5680,8 @@ export enum ExperimentSignificanceCode {
HighPValue = 'high_p_value',
}
-export interface ExperimentTrendsQueryResponse {
- kind: NodeKind.ExperimentTrendsQuery
- insight: Record<string, any>[]
- count_query?: TrendsQuery
- exposure_query?: TrendsQuery
- variants: ExperimentVariantTrendsBaseStats[]
- probability: Record<string, number>
- significant: boolean
- significance_code: ExperimentSignificanceCode
- stats_version?: integer
- p_value: number
- credible_intervals: Record<string, [number, number]>
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[]
-}
-
-export type CachedExperimentTrendsQueryResponse = CachedQueryResponse<ExperimentTrendsQueryResponse>
-
-export interface ExperimentFunnelsQueryResponse {
- kind: NodeKind.ExperimentFunnelsQuery
- insight: Record<string, any>[][]
- funnels_query?: FunnelsQuery
- variants: ExperimentVariantFunnelsBaseStats[]
- probability: Record<string, number>
- significant: boolean
- significance_code: ExperimentSignificanceCode
- expected_loss: number
- credible_intervals: Record<string, [number, number]>
- stats_version?: integer
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[]
-}
-
-export type CachedExperimentFunnelsQueryResponse = CachedQueryResponse<ExperimentFunnelsQueryResponse>
-
-export interface ExperimentFunnelsQuery extends DataNode<ExperimentFunnelsQueryResponse> {
+/** Stored shape of a legacy experiment metric. It no longer runs, so it is kept only to list and migrate legacy experiments. */
+export interface ExperimentFunnelsQuery {
kind: NodeKind.ExperimentFunnelsQuery
uuid?: string
name?: string
@@ -5732,14 +5690,13 @@ export interface ExperimentFunnelsQuery extends DataNode<ExperimentFunnelsQueryR
fingerprint?: string
}
-export interface ExperimentTrendsQuery extends DataNode<ExperimentTrendsQueryResponse> {
+/** Stored shape of a legacy experiment metric. It no longer runs, so it is kept only to list and migrate legacy experiments. */
+export interface ExperimentTrendsQuery {
kind: NodeKind.ExperimentTrendsQuery
uuid?: string
name?: string
experiment_id?: integer
count_query: TrendsQuery
- // Defaults to $feature_flag_called if not specified
- // https://github.com/PostHog/posthog/blob/master/posthog/hogql_queries/experiments/experiment_trends_query_runner.py
exposure_query?: TrendsQuery
fingerprint?: string
}
@@ -6116,15 +6073,6 @@ export type ExperimentRetentionMetric = ExperimentMetricBaseProperties & {
export const isExperimentRetentionMetric = (metric: ExperimentMetric): metric is ExperimentRetentionMetric =>
metric.metric_type === ExperimentMetricType.RETENTION
-// Legacy experiment query type guards
-export const isExperimentTrendsQuery = (
- query: ExperimentTrendsQuery | ExperimentFunnelsQuery
-): query is ExperimentTrendsQuery => query.kind === NodeKind.ExperimentTrendsQuery
-
-export const isExperimentFunnelsQuery = (
- query: ExperimentTrendsQuery | ExperimentFunnelsQuery
-): query is ExperimentFunnelsQuery => query.kind === NodeKind.ExperimentFunnelsQuery
-
export type ExperimentMeanMetricTypeProps = Omit<ExperimentMeanMetric, keyof ExperimentMetricBaseProperties>
export type ExperimentFunnelMetricTypeProps = Omit<ExperimentFunnelMetric, keyof ExperimentMetricBaseProperties>
export type ExperimentRatioMetricTypeProps = Omit<ExperimentRatioMetric, keyof ExperimentMetricBaseProperties>
@@ -6202,22 +6150,6 @@ export interface ExperimentQueryResponse {
warnings?: DataWarehouseSyncWarning[]
}
-// Strongly typed variants of ExperimentQueryResponse for better type safety
-export interface LegacyExperimentQueryResponse {
- kind: NodeKind.ExperimentQuery
- insight: Record<string, any>[]
- metric: ExperimentMetric
- variants: ExperimentVariantTrendsBaseStats[] | ExperimentVariantFunnelsBaseStats[]
- probability: Record<string, number>
- significant: boolean
- significance_code: ExperimentSignificanceCode
- stats_version?: integer
- p_value: number
- credible_intervals: Record<string, [number, number]>
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[]
-}
-
export interface ExperimentActorsQuery extends InsightActorsQueryBase {
kind: NodeKind.ExperimentActorsQuery
source: ExperimentQuery
@@ -6375,7 +6307,6 @@ export interface ExperimentExposureQueryResponse {
}
export type CachedExperimentQueryResponse = CachedQueryResponse<ExperimentQueryResponse>
-export type CachedLegacyExperimentQueryResponse = CachedQueryResponse<LegacyExperimentQueryResponse>
export type CachedNewExperimentQueryResponse = CachedQueryResponse<NewExperimentQueryResponse>
export type CachedExperimentExposureQueryResponse = CachedQueryResponse<ExperimentExposureQueryResponse>
diff --git a/posthog/api/utils.py b/posthog/api/utils.py
index 9e63cd18d430..059c0e0c7009 100644
--- a/posthog/api/utils.py
+++ b/posthog/api/utils.py
@@ -287,8 +287,6 @@ INSIGHT_KINDS = {
ASYNC_QUERY_KINDS = INSIGHT_KINDS | {
"TracesQuery",
"ExperimentQuery",
- "ExperimentTrendsQuery",
- "ExperimentFunnelsQuery",
"ExperimentExposureQuery",
}
_EXTRA_ASYNC_KINDS = ASYNC_QUERY_KINDS - INSIGHT_KINDS
diff --git a/posthog/constants.py b/posthog/constants.py
index deb7472ab645..7a17cc126fe4 100644
--- a/posthog/constants.py
+++ b/posthog/constants.py
@@ -270,15 +270,6 @@ WEEKLY_ACTIVE = "weekly_active"
MONTHLY_ACTIVE = "monthly_active"
-class ExperimentNoResultsErrorKeys(StrEnum):
- NO_EVENTS = "no-events"
- NO_FLAG_INFO = "no-flag-info"
- NO_CONTROL_VARIANT = "no-control-variant"
- NO_TEST_VARIANT = "no-test-variant"
- NO_RESULTS = "no-results"
- NO_EXPOSURES = "no-exposures"
-
-
class PropertyOperatorType(StrEnum):
AND = "AND"
OR = "OR"
diff --git a/posthog/hogql_queries/query_runner.py b/posthog/hogql_queries/query_runner.py
index f3fc8bc7a58a..2cb44ffb3a9b 100644
--- a/posthog/hogql_queries/query_runner.py
+++ b/posthog/hogql_queries/query_runner.py
@@ -1188,34 +1188,6 @@ def get_query_runner(
user=user,
)
- if kind == "ExperimentFunnelsQuery":
- from products.experiments.backend.hogql_queries.experiment_funnels_query_runner import (
- ExperimentFunnelsQueryRunner,
- )
-
- return ExperimentFunnelsQueryRunner(
- query=query,
- team=team,
- timings=timings,
- modifiers=modifiers,
- limit_context=limit_context,
- user=user,
- )
-
- if kind == "ExperimentTrendsQuery":
- from products.experiments.backend.hogql_queries.experiment_trends_query_runner import (
- ExperimentTrendsQueryRunner,
- )
-
- return ExperimentTrendsQueryRunner(
- query=query,
- team=team,
- timings=timings,
- modifiers=modifiers,
- limit_context=limit_context,
- user=user,
- )
-
if kind == "ExperimentQuery":
from products.experiments.backend.hogql_queries.experiment_query_runner import ExperimentQueryRunner
diff --git a/posthog/schema.py b/posthog/schema.py
index f34397ccfbf8..f7f8ea194835 100644
--- a/posthog/schema.py
+++ b/posthog/schema.py
@@ -3031,7 +3031,7 @@ class QueryResponseAlternative7(BaseModel):
stdout: str | None = None
-class QueryResponseAlternative81(BaseModel):
+class QueryResponseAlternative77(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -7443,7 +7443,7 @@ class QueryResponseAlternative10(BaseModel):
)
-class QueryResponseAlternative21(BaseModel):
+class QueryResponseAlternative19(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -7466,7 +7466,7 @@ class QueryResponseAlternative21(BaseModel):
)
-class QueryResponseAlternative31(BaseModel):
+class QueryResponseAlternative29(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -7475,7 +7475,7 @@ class QueryResponseAlternative31(BaseModel):
status: ExternalQueryStatus
-class QueryResponseAlternative88(BaseModel):
+class QueryResponseAlternative84(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -17687,7 +17687,7 @@ class Response13(BaseModel):
)
-class Response18(BaseModel):
+class Response16(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -17738,7 +17738,7 @@ class Response18(BaseModel):
)
-class Response20(BaseModel):
+class Response18(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -17790,7 +17790,7 @@ class Response20(BaseModel):
)
-class Response21(BaseModel):
+class Response19(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -17847,7 +17847,7 @@ class Response21(BaseModel):
)
-class Response22(BaseModel):
+class Response20(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21553,7 +21553,7 @@ class QueryResponseAlternative16(BaseModel):
)
-class QueryResponseAlternative22(BaseModel):
+class QueryResponseAlternative20(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21603,7 +21603,7 @@ class QueryResponseAlternative22(BaseModel):
)
-class QueryResponseAlternative23(BaseModel):
+class QueryResponseAlternative21(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21661,7 +21661,7 @@ class QueryResponseAlternative23(BaseModel):
)
-class QueryResponseAlternative24(BaseModel):
+class QueryResponseAlternative22(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21729,7 +21729,7 @@ class QueryResponseAlternative24(BaseModel):
)
-class QueryResponseAlternative25(BaseModel):
+class QueryResponseAlternative23(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21782,7 +21782,7 @@ class QueryResponseAlternative25(BaseModel):
)
-class QueryResponseAlternative26(BaseModel):
+class QueryResponseAlternative24(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21834,7 +21834,7 @@ class QueryResponseAlternative26(BaseModel):
)
-class QueryResponseAlternative28(BaseModel):
+class QueryResponseAlternative26(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21895,7 +21895,7 @@ class QueryResponseAlternative28(BaseModel):
)
-class QueryResponseAlternative29(BaseModel):
+class QueryResponseAlternative27(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21950,7 +21950,7 @@ class QueryResponseAlternative29(BaseModel):
)
-class QueryResponseAlternative30(BaseModel):
+class QueryResponseAlternative28(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22000,7 +22000,7 @@ class QueryResponseAlternative30(BaseModel):
)
-class QueryResponseAlternative32(BaseModel):
+class QueryResponseAlternative30(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22049,7 +22049,7 @@ class QueryResponseAlternative32(BaseModel):
)
-class QueryResponseAlternative33(BaseModel):
+class QueryResponseAlternative31(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22114,7 +22114,7 @@ class QueryResponseAlternative33(BaseModel):
)
-class QueryResponseAlternative34(BaseModel):
+class QueryResponseAlternative32(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22174,7 +22174,7 @@ class QueryResponseAlternative34(BaseModel):
)
-class QueryResponseAlternative35(BaseModel):
+class QueryResponseAlternative33(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22244,7 +22244,7 @@ class QueryResponseAlternative35(BaseModel):
)
-class QueryResponseAlternative36(BaseModel):
+class QueryResponseAlternative34(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22308,7 +22308,7 @@ class QueryResponseAlternative36(BaseModel):
)
-class QueryResponseAlternative37(BaseModel):
+class QueryResponseAlternative35(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22378,7 +22378,7 @@ class QueryResponseAlternative37(BaseModel):
)
-class QueryResponseAlternative38(BaseModel):
+class QueryResponseAlternative36(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22429,7 +22429,7 @@ class QueryResponseAlternative38(BaseModel):
)
-class QueryResponseAlternative39(BaseModel):
+class QueryResponseAlternative37(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22482,7 +22482,7 @@ class QueryResponseAlternative39(BaseModel):
)
-class QueryResponseAlternative40(BaseModel):
+class QueryResponseAlternative38(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22535,7 +22535,7 @@ class QueryResponseAlternative40(BaseModel):
)
-class QueryResponseAlternative41(BaseModel):
+class QueryResponseAlternative39(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22588,7 +22588,7 @@ class QueryResponseAlternative41(BaseModel):
)
-class QueryResponseAlternative43(BaseModel):
+class QueryResponseAlternative41(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22646,7 +22646,7 @@ class QueryResponseAlternative43(BaseModel):
)
-class QueryResponseAlternative44(BaseModel):
+class QueryResponseAlternative42(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22714,7 +22714,7 @@ class QueryResponseAlternative44(BaseModel):
)
-class QueryResponseAlternative45(BaseModel):
+class QueryResponseAlternative43(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22767,7 +22767,7 @@ class QueryResponseAlternative45(BaseModel):
)
-class QueryResponseAlternative46(BaseModel):
+class QueryResponseAlternative44(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22819,7 +22819,7 @@ class QueryResponseAlternative46(BaseModel):
)
-class QueryResponseAlternative47(BaseModel):
+class QueryResponseAlternative45(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22880,7 +22880,7 @@ class QueryResponseAlternative47(BaseModel):
)
-class QueryResponseAlternative48(BaseModel):
+class QueryResponseAlternative46(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22935,7 +22935,7 @@ class QueryResponseAlternative48(BaseModel):
)
-class QueryResponseAlternative49(BaseModel):
+class QueryResponseAlternative47(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22987,7 +22987,7 @@ class QueryResponseAlternative49(BaseModel):
)
-class QueryResponseAlternative50(BaseModel):
+class QueryResponseAlternative48(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23039,7 +23039,7 @@ class QueryResponseAlternative50(BaseModel):
)
-class QueryResponseAlternative51(BaseModel):
+class QueryResponseAlternative49(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23104,7 +23104,7 @@ class QueryResponseAlternative51(BaseModel):
)
-class QueryResponseAlternative52(BaseModel):
+class QueryResponseAlternative50(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23164,7 +23164,7 @@ class QueryResponseAlternative52(BaseModel):
)
-class QueryResponseAlternative53(BaseModel):
+class QueryResponseAlternative51(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23215,7 +23215,7 @@ class QueryResponseAlternative53(BaseModel):
)
-class QueryResponseAlternative57(BaseModel):
+class QueryResponseAlternative53(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23266,7 +23266,7 @@ class QueryResponseAlternative57(BaseModel):
)
-class QueryResponseAlternative59(BaseModel):
+class QueryResponseAlternative55(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23318,7 +23318,7 @@ class QueryResponseAlternative59(BaseModel):
)
-class QueryResponseAlternative60(BaseModel):
+class QueryResponseAlternative56(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23375,7 +23375,7 @@ class QueryResponseAlternative60(BaseModel):
)
-class QueryResponseAlternative61(BaseModel):
+class QueryResponseAlternative57(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23430,7 +23430,7 @@ class QueryResponseAlternative61(BaseModel):
)
-class QueryResponseAlternative62(BaseModel):
+class QueryResponseAlternative58(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23479,7 +23479,7 @@ class QueryResponseAlternative62(BaseModel):
)
-class QueryResponseAlternative63(BaseModel):
+class QueryResponseAlternative59(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23533,7 +23533,7 @@ class QueryResponseAlternative63(BaseModel):
)
-class QueryResponseAlternative64(BaseModel):
+class QueryResponseAlternative60(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23580,7 +23580,7 @@ class QueryResponseAlternative64(BaseModel):
)
-class QueryResponseAlternative65(BaseModel):
+class QueryResponseAlternative61(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23627,7 +23627,7 @@ class QueryResponseAlternative65(BaseModel):
)
-class QueryResponseAlternative66(BaseModel):
+class QueryResponseAlternative62(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23674,7 +23674,7 @@ class QueryResponseAlternative66(BaseModel):
)
-class QueryResponseAlternative67(BaseModel):
+class QueryResponseAlternative63(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23721,7 +23721,7 @@ class QueryResponseAlternative67(BaseModel):
)
-class QueryResponseAlternative69(BaseModel):
+class QueryResponseAlternative65(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23773,7 +23773,7 @@ class QueryResponseAlternative69(BaseModel):
)
-class QueryResponseAlternative71(BaseModel):
+class QueryResponseAlternative67(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23825,7 +23825,7 @@ class QueryResponseAlternative71(BaseModel):
)
-class QueryResponseAlternative72(BaseModel):
+class QueryResponseAlternative68(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23877,7 +23877,7 @@ class QueryResponseAlternative72(BaseModel):
)
-class QueryResponseAlternative73(BaseModel):
+class QueryResponseAlternative69(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23925,7 +23925,7 @@ class QueryResponseAlternative73(BaseModel):
)
-class QueryResponseAlternative74(BaseModel):
+class QueryResponseAlternative70(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23972,7 +23972,7 @@ class QueryResponseAlternative74(BaseModel):
)
-class QueryResponseAlternative75(BaseModel):
+class QueryResponseAlternative71(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24019,7 +24019,7 @@ class QueryResponseAlternative75(BaseModel):
)
-class QueryResponseAlternative76(BaseModel):
+class QueryResponseAlternative72(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24072,7 +24072,7 @@ class QueryResponseAlternative76(BaseModel):
)
-class QueryResponseAlternative77(BaseModel):
+class QueryResponseAlternative73(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24123,7 +24123,7 @@ class QueryResponseAlternative77(BaseModel):
)
-class QueryResponseAlternative78(BaseModel):
+class QueryResponseAlternative74(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24174,7 +24174,7 @@ class QueryResponseAlternative78(BaseModel):
)
-class QueryResponseAlternative79(BaseModel):
+class QueryResponseAlternative75(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24225,7 +24225,7 @@ class QueryResponseAlternative79(BaseModel):
)
-class QueryResponseAlternative80(BaseModel):
+class QueryResponseAlternative76(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24276,7 +24276,7 @@ class QueryResponseAlternative80(BaseModel):
)
-class QueryResponseAlternative82(BaseModel):
+class QueryResponseAlternative78(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24326,7 +24326,7 @@ class QueryResponseAlternative82(BaseModel):
)
-class QueryResponseAlternative83(BaseModel):
+class QueryResponseAlternative79(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24376,7 +24376,7 @@ class QueryResponseAlternative83(BaseModel):
)
-class QueryResponseAlternative84(BaseModel):
+class QueryResponseAlternative80(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24423,7 +24423,7 @@ class QueryResponseAlternative84(BaseModel):
)
-class QueryResponseAlternative85(BaseModel):
+class QueryResponseAlternative81(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24474,7 +24474,7 @@ class QueryResponseAlternative85(BaseModel):
)
-class QueryResponseAlternative89(BaseModel):
+class QueryResponseAlternative85(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24521,7 +24521,7 @@ class QueryResponseAlternative89(BaseModel):
)
-class QueryResponseAlternative90(BaseModel):
+class QueryResponseAlternative86(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24568,7 +24568,7 @@ class QueryResponseAlternative90(BaseModel):
)
-class QueryResponseAlternative91(BaseModel):
+class QueryResponseAlternative87(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24625,7 +24625,7 @@ class QueryResponseAlternative91(BaseModel):
)
-class QueryResponseAlternative92(BaseModel):
+class QueryResponseAlternative88(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24680,7 +24680,7 @@ class QueryResponseAlternative92(BaseModel):
)
-class QueryResponseAlternative93(BaseModel):
+class QueryResponseAlternative89(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24727,7 +24727,7 @@ class QueryResponseAlternative93(BaseModel):
)
-class QueryResponseAlternative94(BaseModel):
+class QueryResponseAlternative90(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24779,7 +24779,7 @@ class QueryResponseAlternative94(BaseModel):
)
-class QueryResponseAlternative95(BaseModel):
+class QueryResponseAlternative91(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24826,7 +24826,7 @@ class QueryResponseAlternative95(BaseModel):
)
-class QueryResponseAlternative96(BaseModel):
+class QueryResponseAlternative92(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24873,7 +24873,7 @@ class QueryResponseAlternative96(BaseModel):
)
-class QueryResponseAlternative97(BaseModel):
+class QueryResponseAlternative93(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24920,7 +24920,7 @@ class QueryResponseAlternative97(BaseModel):
)
-class QueryResponseAlternative98(BaseModel):
+class QueryResponseAlternative94(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -24967,7 +24967,7 @@ class QueryResponseAlternative98(BaseModel):
)
-class QueryResponseAlternative99(BaseModel):
+class QueryResponseAlternative95(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25018,7 +25018,7 @@ class QueryResponseAlternative99(BaseModel):
)
-class QueryResponseAlternative100(BaseModel):
+class QueryResponseAlternative96(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25065,7 +25065,7 @@ class QueryResponseAlternative100(BaseModel):
)
-class QueryResponseAlternative101(BaseModel):
+class QueryResponseAlternative97(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25112,7 +25112,7 @@ class QueryResponseAlternative101(BaseModel):
)
-class QueryResponseAlternative102(BaseModel):
+class QueryResponseAlternative98(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25159,7 +25159,7 @@ class QueryResponseAlternative102(BaseModel):
)
-class QueryResponseAlternative103(BaseModel):
+class QueryResponseAlternative99(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25206,7 +25206,7 @@ class QueryResponseAlternative103(BaseModel):
)
-class QueryResponseAlternative104(BaseModel):
+class QueryResponseAlternative100(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25256,7 +25256,7 @@ class QueryResponseAlternative104(BaseModel):
)
-class QueryResponseAlternative105(BaseModel):
+class QueryResponseAlternative101(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25303,7 +25303,7 @@ class QueryResponseAlternative105(BaseModel):
)
-class QueryResponseAlternative106(BaseModel):
+class QueryResponseAlternative102(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25365,7 +25365,7 @@ class QueryResponseAlternative106(BaseModel):
)
-class QueryResponseAlternative107(BaseModel):
+class QueryResponseAlternative103(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25412,7 +25412,7 @@ class QueryResponseAlternative107(BaseModel):
)
-class QueryResponseAlternative108(BaseModel):
+class QueryResponseAlternative104(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25459,7 +25459,7 @@ class QueryResponseAlternative108(BaseModel):
)
-class QueryResponseAlternative109(BaseModel):
+class QueryResponseAlternative105(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25506,7 +25506,7 @@ class QueryResponseAlternative109(BaseModel):
)
-class QueryResponseAlternative110(BaseModel):
+class QueryResponseAlternative106(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25553,7 +25553,7 @@ class QueryResponseAlternative110(BaseModel):
)
-class QueryResponseAlternative111(BaseModel):
+class QueryResponseAlternative107(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25600,7 +25600,7 @@ class QueryResponseAlternative111(BaseModel):
)
-class QueryResponseAlternative112(BaseModel):
+class QueryResponseAlternative108(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25647,7 +25647,7 @@ class QueryResponseAlternative112(BaseModel):
)
-class QueryResponseAlternative113(BaseModel):
+class QueryResponseAlternative109(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25694,7 +25694,7 @@ class QueryResponseAlternative113(BaseModel):
)
-class QueryResponseAlternative114(BaseModel):
+class QueryResponseAlternative110(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -25742,7 +25742,7 @@ class QueryResponseAlternative114(BaseModel):
)
-class QueryResponseAlternative115(BaseModel):
+class QueryResponseAlternative111(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -29647,7 +29647,7 @@ class QueryResponseAlternative17(BaseModel):
)
-class QueryResponseAlternative42(BaseModel):
+class QueryResponseAlternative40(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -29700,7 +29700,7 @@ class QueryResponseAlternative42(BaseModel):
)
-class QueryResponseAlternative54(BaseModel):
+class QueryResponseAlternative52(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -31900,7 +31900,7 @@ class PathsV2ActorsQuery(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class QueryResponseAlternative70(BaseModel):
+class QueryResponseAlternative66(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -32049,67 +32049,6 @@ class TrendsQuery(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class CachedExperimentTrendsQueryResponse(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- cache_key: str
- cache_target_age: AwareDatetime | None = None
- calculation_trigger: str | None = Field(
- default=None,
- description=("What triggered the calculation of the query, leave empty if user/immediate"),
- )
- count_query: TrendsQuery | None = None
- credible_intervals: dict[str, list[float]]
- exposure_query: TrendsQuery | None = None
- insight: list[dict[str, Any]]
- is_cached: bool
- kind: Literal["ExperimentTrendsQuery"] = "ExperimentTrendsQuery"
- last_refresh: AwareDatetime
- next_allowed_client_refresh: AwareDatetime
- p_value: float
- probability: dict[str, float]
- query_metadata: dict[str, Any] | None = None
- query_scan: QueryScanSummary | None = Field(
- default=None,
- description=("The rows and time of the run that produced these results, with its analysis once it is stored."),
- )
- query_status: QueryStatus | None = Field(
- default=None,
- description=("Query status indicates whether next to the provided data, a query is still running."),
- )
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- timezone: str
- variants: list[ExperimentVariantTrendsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
-class Response17(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- count_query: TrendsQuery | None = None
- credible_intervals: dict[str, list[float]]
- exposure_query: TrendsQuery | None = None
- insight: list[dict[str, Any]]
- kind: Literal["ExperimentTrendsQuery"] = "ExperimentTrendsQuery"
- p_value: float
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantTrendsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
class DatabaseSchemaQuery(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -32228,25 +32167,17 @@ class ExperimentQueryResponse(BaseModel):
)
-class ExperimentTrendsQueryResponse(BaseModel):
+class ExperimentTrendsQuery(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
- count_query: TrendsQuery | None = None
- credible_intervals: dict[str, list[float]]
+ count_query: TrendsQuery
+ experiment_id: int | None = None
exposure_query: TrendsQuery | None = None
- insight: list[dict[str, Any]]
+ fingerprint: str | None = None
kind: Literal["ExperimentTrendsQuery"] = "ExperimentTrendsQuery"
- p_value: float
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantTrendsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
+ name: str | None = None
+ uuid: str | None = None
class FunnelsQuery(BaseModel):
@@ -32281,70 +32212,7 @@ class FunnelsQuery(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class LegacyExperimentQueryResponse(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- credible_intervals: dict[str, list[float]]
- insight: list[dict[str, Any]]
- kind: Literal["ExperimentQuery"] = "ExperimentQuery"
- metric: ExperimentMeanMetric | ExperimentFunnelMetric | ExperimentRatioMetric | ExperimentRetentionMetric = Field(
- ..., discriminator="metric_type"
- )
- p_value: float
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantTrendsBaseStats] | list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
class QueryResponseAlternative18(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- credible_intervals: dict[str, list[float]]
- expected_loss: float
- funnels_query: FunnelsQuery | None = None
- insight: list[list[dict[str, Any]]]
- kind: Literal["ExperimentFunnelsQuery"] = "ExperimentFunnelsQuery"
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
-class QueryResponseAlternative19(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- count_query: TrendsQuery | None = None
- credible_intervals: dict[str, list[float]]
- exposure_query: TrendsQuery | None = None
- insight: list[dict[str, Any]]
- kind: Literal["ExperimentTrendsQuery"] = "ExperimentTrendsQuery"
- p_value: float
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantTrendsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
-class QueryResponseAlternative20(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -32380,47 +32248,6 @@ class QueryResponseAlternative20(BaseModel):
)
-class QueryResponseAlternative55(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- credible_intervals: dict[str, list[float]]
- expected_loss: float
- funnels_query: FunnelsQuery | None = None
- insight: list[list[dict[str, Any]]]
- kind: Literal["ExperimentFunnelsQuery"] = "ExperimentFunnelsQuery"
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
-class QueryResponseAlternative56(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- count_query: TrendsQuery | None = None
- credible_intervals: dict[str, list[float]]
- exposure_query: TrendsQuery | None = None
- insight: list[dict[str, Any]]
- kind: Literal["ExperimentTrendsQuery"] = "ExperimentTrendsQuery"
- p_value: float
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantTrendsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
class QueryResponseAlternative(
RootModel[
dict[str, Any]
@@ -32448,8 +32275,8 @@ class QueryResponseAlternative(
| QueryResponseAlternative22
| QueryResponseAlternative23
| QueryResponseAlternative24
- | QueryResponseAlternative25
| QueryResponseAlternative26
+ | QueryResponseAlternative27
| QueryResponseAlternative28
| QueryResponseAlternative29
| QueryResponseAlternative30
@@ -32459,9 +32286,9 @@ class QueryResponseAlternative(
| QueryResponseAlternative34
| QueryResponseAlternative35
| QueryResponseAlternative36
+ | Any
| QueryResponseAlternative37
| QueryResponseAlternative38
- | Any
| QueryResponseAlternative39
| QueryResponseAlternative40
| QueryResponseAlternative41
@@ -32477,19 +32304,19 @@ class QueryResponseAlternative(
| QueryResponseAlternative51
| QueryResponseAlternative52
| QueryResponseAlternative53
- | QueryResponseAlternative54
| QueryResponseAlternative55
| QueryResponseAlternative56
| QueryResponseAlternative57
+ | QueryResponseAlternative58
| QueryResponseAlternative59
| QueryResponseAlternative60
| QueryResponseAlternative61
| QueryResponseAlternative62
| QueryResponseAlternative63
- | QueryResponseAlternative64
| QueryResponseAlternative65
| QueryResponseAlternative66
| QueryResponseAlternative67
+ | QueryResponseAlternative68
| QueryResponseAlternative69
| QueryResponseAlternative70
| QueryResponseAlternative71
@@ -32503,10 +32330,10 @@ class QueryResponseAlternative(
| QueryResponseAlternative79
| QueryResponseAlternative80
| QueryResponseAlternative81
- | QueryResponseAlternative82
- | QueryResponseAlternative83
| QueryResponseAlternative84
| QueryResponseAlternative85
+ | QueryResponseAlternative86
+ | QueryResponseAlternative87
| QueryResponseAlternative88
| QueryResponseAlternative89
| QueryResponseAlternative90
@@ -32531,10 +32358,6 @@ class QueryResponseAlternative(
| QueryResponseAlternative109
| QueryResponseAlternative110
| QueryResponseAlternative111
- | QueryResponseAlternative112
- | QueryResponseAlternative113
- | QueryResponseAlternative114
- | QueryResponseAlternative115
]
):
root: (
@@ -32563,8 +32386,8 @@ class QueryResponseAlternative(
| QueryResponseAlternative22
| QueryResponseAlternative23
| QueryResponseAlternative24
- | QueryResponseAlternative25
| QueryResponseAlternative26
+ | QueryResponseAlternative27
| QueryResponseAlternative28
| QueryResponseAlternative29
| QueryResponseAlternative30
@@ -32574,9 +32397,9 @@ class QueryResponseAlternative(
| QueryResponseAlternative34
| QueryResponseAlternative35
| QueryResponseAlternative36
+ | Any
| QueryResponseAlternative37
| QueryResponseAlternative38
- | Any
| QueryResponseAlternative39
| QueryResponseAlternative40
| QueryResponseAlternative41
@@ -32592,19 +32415,19 @@ class QueryResponseAlternative(
| QueryResponseAlternative51
| QueryResponseAlternative52
| QueryResponseAlternative53
- | QueryResponseAlternative54
| QueryResponseAlternative55
| QueryResponseAlternative56
| QueryResponseAlternative57
+ | QueryResponseAlternative58
| QueryResponseAlternative59
| QueryResponseAlternative60
| QueryResponseAlternative61
| QueryResponseAlternative62
| QueryResponseAlternative63
- | QueryResponseAlternative64
| QueryResponseAlternative65
| QueryResponseAlternative66
| QueryResponseAlternative67
+ | QueryResponseAlternative68
| QueryResponseAlternative69
| QueryResponseAlternative70
| QueryResponseAlternative71
@@ -32618,10 +32441,10 @@ class QueryResponseAlternative(
| QueryResponseAlternative79
| QueryResponseAlternative80
| QueryResponseAlternative81
- | QueryResponseAlternative82
- | QueryResponseAlternative83
| QueryResponseAlternative84
| QueryResponseAlternative85
+ | QueryResponseAlternative86
+ | QueryResponseAlternative87
| QueryResponseAlternative88
| QueryResponseAlternative89
| QueryResponseAlternative90
@@ -32646,10 +32469,6 @@ class QueryResponseAlternative(
| QueryResponseAlternative109
| QueryResponseAlternative110
| QueryResponseAlternative111
- | QueryResponseAlternative112
- | QueryResponseAlternative113
- | QueryResponseAlternative114
- | QueryResponseAlternative115
)
@@ -32678,45 +32497,6 @@ class IsExperimentRetentionMetric(BaseModel):
namedArgs: NamedArgs2 | None = None
-class CachedExperimentFunnelsQueryResponse(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- cache_key: str
- cache_target_age: AwareDatetime | None = None
- calculation_trigger: str | None = Field(
- default=None,
- description=("What triggered the calculation of the query, leave empty if user/immediate"),
- )
- credible_intervals: dict[str, list[float]]
- expected_loss: float
- funnels_query: FunnelsQuery | None = None
- insight: list[list[dict[str, Any]]]
- is_cached: bool
- kind: Literal["ExperimentFunnelsQuery"] = "ExperimentFunnelsQuery"
- last_refresh: AwareDatetime
- next_allowed_client_refresh: AwareDatetime
- probability: dict[str, float]
- query_metadata: dict[str, Any] | None = None
- query_scan: QueryScanSummary | None = Field(
- default=None,
- description=("The rows and time of the run that produced these results, with its analysis once it is stored."),
- )
- query_status: QueryStatus | None = Field(
- default=None,
- description=("Query status indicates whether next to the provided data, a query is still running."),
- )
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- timezone: str
- variants: list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
class CachedExperimentQueryResponse(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -32772,85 +32552,16 @@ class CachedExperimentQueryResponse(BaseModel):
)
-class CachedLegacyExperimentQueryResponse(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- cache_key: str
- cache_target_age: AwareDatetime | None = None
- calculation_trigger: str | None = Field(
- default=None,
- description=("What triggered the calculation of the query, leave empty if user/immediate"),
- )
- credible_intervals: dict[str, list[float]]
- insight: list[dict[str, Any]]
- is_cached: bool
- kind: Literal["ExperimentQuery"] = "ExperimentQuery"
- last_refresh: AwareDatetime
- metric: ExperimentMeanMetric | ExperimentFunnelMetric | ExperimentRatioMetric | ExperimentRetentionMetric = Field(
- ..., discriminator="metric_type"
- )
- next_allowed_client_refresh: AwareDatetime
- p_value: float
- probability: dict[str, float]
- query_metadata: dict[str, Any] | None = None
- query_scan: QueryScanSummary | None = Field(
- default=None,
- description=("The rows and time of the run that produced these results, with its analysis once it is stored."),
- )
- query_status: QueryStatus | None = Field(
- default=None,
- description=("Query status indicates whether next to the provided data, a query is still running."),
- )
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- timezone: str
- variants: list[ExperimentVariantTrendsBaseStats] | list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
-class Response16(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- credible_intervals: dict[str, list[float]]
- expected_loss: float
- funnels_query: FunnelsQuery | None = None
- insight: list[list[dict[str, Any]]]
- kind: Literal["ExperimentFunnelsQuery"] = "ExperimentFunnelsQuery"
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
-
-
-class ExperimentFunnelsQueryResponse(BaseModel):
+class ExperimentFunnelsQuery(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
- credible_intervals: dict[str, list[float]]
- expected_loss: float
- funnels_query: FunnelsQuery | None = None
- insight: list[list[dict[str, Any]]]
+ experiment_id: int | None = None
+ fingerprint: str | None = None
+ funnels_query: FunnelsQuery
kind: Literal["ExperimentFunnelsQuery"] = "ExperimentFunnelsQuery"
- probability: dict[str, float]
- significance_code: ExperimentSignificanceCode
- significant: bool
- stats_version: int | None = None
- variants: list[ExperimentVariantFunnelsBaseStats]
- warnings: list[DataWarehouseSyncWarning] | None = Field(
- default=None,
- description=("Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics."),
- )
+ name: str | None = None
+ uuid: str | None = None
class ExperimentMetricTimeseries(BaseModel):
@@ -32886,23 +32597,6 @@ class ExperimentQuery(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class ExperimentTrendsQuery(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- count_query: TrendsQuery
- experiment_id: int | None = None
- exposure_query: TrendsQuery | None = None
- fingerprint: str | None = None
- kind: Literal["ExperimentTrendsQuery"] = "ExperimentTrendsQuery"
- modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")
- name: str | None = None
- response: ExperimentTrendsQueryResponse | None = None
- tags: QueryLogTags | None = None
- uuid: str | None = None
- version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-
-
class FunnelPathsFilter(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -33112,22 +32806,6 @@ class ExperimentActorsQuery(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class ExperimentFunnelsQuery(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- experiment_id: int | None = None
- fingerprint: str | None = None
- funnels_query: FunnelsQuery
- kind: Literal["ExperimentFunnelsQuery"] = "ExperimentFunnelsQuery"
- modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")
- name: str | None = None
- response: ExperimentFunnelsQueryResponse | None = None
- tags: QueryLogTags | None = None
- uuid: str | None = None
- version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-
-
class FunnelCorrelationQuery(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -33252,21 +32930,6 @@ class WebVitalsQuery(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class NamedArgs3(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- )
- query: ExperimentTrendsQuery | ExperimentFunnelsQuery
-
-
-class IsExperimentFunnelsQuery(BaseModel):
- namedArgs: NamedArgs3 | None = None
-
-
-class IsExperimentTrendsQuery(BaseModel):
- namedArgs: NamedArgs3 | None = None
-
-
class DocumentArtifactContent(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -33570,11 +33233,9 @@ class DataTableNode(BaseModel):
| Response14
| Response15
| Response16
- | Response17
| Response18
+ | Response19
| Response20
- | Response21
- | Response22
| None
) = None
showAbsoluteTime: bool | None = Field(
@@ -33656,8 +33317,6 @@ class DataTableNode(BaseModel):
| MarketingAnalyticsAggregatedQuery
| ErrorTrackingQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| TracesQuery
| TraceQuery
| SessionQuery
@@ -33752,8 +33411,6 @@ class HogQLAutocomplete(BaseModel):
| TraceSpansAggregationQuery
| TraceSpansTreeQuery
| TraceSpansAttributeBreakdownQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| CalendarHeatmapQuery
| RecordingsQuery
| TracesQuery
@@ -33888,8 +33545,6 @@ class HogQLMetadata(BaseModel):
| TraceSpansAggregationQuery
| TraceSpansTreeQuery
| TraceSpansAttributeBreakdownQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| CalendarHeatmapQuery
| RecordingsQuery
| TracesQuery
@@ -33992,8 +33647,6 @@ class MaxInsightContext(BaseModel):
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -34138,8 +33791,6 @@ class QueryRequest(BaseModel):
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -34276,8 +33927,6 @@ class QuerySchemaRoot(
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -34384,8 +34033,6 @@ class QuerySchemaRoot(
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -34497,8 +34144,6 @@ class QueryUpgradeRequest(BaseModel):
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -34610,8 +34255,6 @@ class QueryUpgradeResponse(BaseModel):
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
@@ -34768,8 +34411,6 @@ class VisualizationArtifactContent(BaseModel):
| ErrorTrackingBreakdownsQuery
| ErrorTrackingReleasesQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| ExperimentQuery
| ExperimentExposureQuery
| DocumentSimilarityQuery
diff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.ts
index 43218235f40b..b298d073049e 100644
--- a/products/dashboards/frontend/generated/api.schemas.ts
+++ b/products/dashboards/frontend/generated/api.schemas.ts
@@ -5678,73 +5678,6 @@ export interface Response15Api {
warnings?: (DataWarehouseSyncWarningApi | AccessControlFilterWarningApi)[] | null
}
-export type ExperimentSignificanceCodeApi =
- (typeof ExperimentSignificanceCodeApi)[keyof typeof ExperimentSignificanceCodeApi]
-
-export const ExperimentSignificanceCodeApi = {
- Significant: 'significant',
- NotEnoughExposure: 'not_enough_exposure',
- LowWinProbability: 'low_win_probability',
- HighLoss: 'high_loss',
- HighPValue: 'high_p_value',
-} as const
-
-export interface ExperimentVariantFunnelsBaseStatsApi {
- failure_count: number
- key: string
- success_count: number
-}
-
-export type Response16ApiCredibleIntervals = { [key: string]: number[] }
-
-export type Response16ApiInsightItemItem = { [key: string]: unknown }
-
-export type Response16ApiProbability = { [key: string]: number }
-
-export interface Response16Api {
- credible_intervals: Response16ApiCredibleIntervals
- expected_loss: number
- funnels_query?: FunnelsQueryApi | null
- insight: Response16ApiInsightItemItem[][]
- kind?: 'ExperimentFunnelsQuery'
- probability: Response16ApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantFunnelsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
-export interface ExperimentVariantTrendsBaseStatsApi {
- absolute_exposure: number
- count: number
- exposure: number
- key: string
-}
-
-export type Response17ApiCredibleIntervals = { [key: string]: number[] }
-
-export type Response17ApiInsightItem = { [key: string]: unknown }
-
-export type Response17ApiProbability = { [key: string]: number }
-
-export interface Response17Api {
- count_query?: TrendsQueryApi | null
- credible_intervals: Response17ApiCredibleIntervals
- exposure_query?: TrendsQueryApi | null
- insight: Response17ApiInsightItem[]
- kind?: 'ExperimentTrendsQuery'
- p_value: number
- probability: Response17ApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantTrendsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
export type AIEventTypeApi = (typeof AIEventTypeApi)[keyof typeof AIEventTypeApi]
export const AIEventTypeApi = {
@@ -5825,7 +5758,7 @@ export interface LLMTraceApi {
webSearchCost?: number | null
}
-export interface Response18Api {
+export interface Response16Api {
columns?: string[] | null
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
@@ -5851,7 +5784,7 @@ export interface Response18Api {
warnings?: (DataWarehouseSyncWarningApi | AccessControlFilterWarningApi)[] | null
}
-export interface Response20Api {
+export interface Response18Api {
columns?: unknown[] | null
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
@@ -5878,7 +5811,7 @@ export interface Response20Api {
warnings?: (DataWarehouseSyncWarningApi | AccessControlFilterWarningApi)[] | null
}
-export interface Response21Api {
+export interface Response19Api {
columns: unknown[]
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
@@ -5953,7 +5886,7 @@ export interface AccountsTableRowApi {
tags?: string[] | null
}
-export interface Response22Api {
+export interface Response20Api {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
hasMore: boolean
@@ -6871,6 +6804,30 @@ export interface ExperimentBreakdownResultApi {
variants: ExperimentVariantResultFrequentistApi[] | ExperimentVariantResultBayesianApi[]
}
+export type ExperimentSignificanceCodeApi =
+ (typeof ExperimentSignificanceCodeApi)[keyof typeof ExperimentSignificanceCodeApi]
+
+export const ExperimentSignificanceCodeApi = {
+ Significant: 'significant',
+ NotEnoughExposure: 'not_enough_exposure',
+ LowWinProbability: 'low_win_probability',
+ HighLoss: 'high_loss',
+ HighPValue: 'high_p_value',
+} as const
+
+export interface ExperimentVariantTrendsBaseStatsApi {
+ absolute_exposure: number
+ count: number
+ exposure: number
+ key: string
+}
+
+export interface ExperimentVariantFunnelsBaseStatsApi {
+ failure_count: number
+ key: string
+ success_count: number
+}
+
export type ExperimentQueryResponseApiCredibleIntervals = { [key: string]: number[] } | null
export type ExperimentQueryResponseApiInsight = { [key: string]: unknown }[] | null
@@ -8367,80 +8324,6 @@ export interface ErrorTrackingIssueCorrelationQueryApi {
version?: number | null
}
-export type ExperimentFunnelsQueryResponseApiCredibleIntervals = { [key: string]: number[] }
-
-export type ExperimentFunnelsQueryResponseApiInsightItemItem = { [key: string]: unknown }
-
-export type ExperimentFunnelsQueryResponseApiProbability = { [key: string]: number }
-
-export interface ExperimentFunnelsQueryResponseApi {
- credible_intervals: ExperimentFunnelsQueryResponseApiCredibleIntervals
- expected_loss: number
- funnels_query?: FunnelsQueryApi | null
- insight: ExperimentFunnelsQueryResponseApiInsightItemItem[][]
- kind?: 'ExperimentFunnelsQuery'
- probability: ExperimentFunnelsQueryResponseApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantFunnelsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
-export interface ExperimentFunnelsQueryApi {
- experiment_id?: number | null
- fingerprint?: string | null
- funnels_query: FunnelsQueryApi
- kind?: 'ExperimentFunnelsQuery'
- /** Modifiers used when performing the query */
- modifiers?: HogQLQueryModifiersApi | null
- name?: string | null
- response?: ExperimentFunnelsQueryResponseApi | null
- tags?: QueryLogTagsApi | null
- uuid?: string | null
- /** version of the node, used for schema migrations */
- version?: number | null
-}
-
-export type ExperimentTrendsQueryResponseApiCredibleIntervals = { [key: string]: number[] }
-
-export type ExperimentTrendsQueryResponseApiInsightItem = { [key: string]: unknown }
-
-export type ExperimentTrendsQueryResponseApiProbability = { [key: string]: number }
-
-export interface ExperimentTrendsQueryResponseApi {
- count_query?: TrendsQueryApi | null
- credible_intervals: ExperimentTrendsQueryResponseApiCredibleIntervals
- exposure_query?: TrendsQueryApi | null
- insight: ExperimentTrendsQueryResponseApiInsightItem[]
- kind?: 'ExperimentTrendsQuery'
- p_value: number
- probability: ExperimentTrendsQueryResponseApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantTrendsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
-export interface ExperimentTrendsQueryApi {
- count_query: TrendsQueryApi
- experiment_id?: number | null
- exposure_query?: TrendsQueryApi | null
- fingerprint?: string | null
- kind?: 'ExperimentTrendsQuery'
- /** Modifiers used when performing the query */
- modifiers?: HogQLQueryModifiersApi | null
- name?: string | null
- response?: ExperimentTrendsQueryResponseApi | null
- tags?: QueryLogTagsApi | null
- uuid?: string | null
- /** version of the node, used for schema migrations */
- version?: number | null
-}
-
export interface TracesQueryResponseApi {
columns?: string[] | null
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -9091,11 +8974,9 @@ export type DataTableNodeApiResponse =
| Response14Api
| Response15Api
| Response16Api
- | Response17Api
| Response18Api
+ | Response19Api
| Response20Api
- | Response21Api
- | Response22Api
| null
export interface DataTableNodeApi {
@@ -9190,8 +9071,6 @@ export interface DataTableNodeApi {
| MarketingAnalyticsAggregatedQueryApi
| ErrorTrackingQueryApi
| ErrorTrackingIssueCorrelationQueryApi
- | ExperimentFunnelsQueryApi
- | ExperimentTrendsQueryApi
| TracesQueryApi
| TraceQueryApi
| SessionQueryApi
diff --git a/products/desktop/packages/api-client/src/generated.ts b/products/desktop/packages/api-client/src/generated.ts
index 4c833575fa87..7b4d8bcd9523 100644
--- a/products/desktop/packages/api-client/src/generated.ts
+++ b/products/desktop/packages/api-client/src/generated.ts
@@ -7344,33 +7344,6 @@ export namespace Schemas {
> | null)
| undefined;
};
- export type Response16 = {
- credible_intervals: Record<string, Array<number>>;
- expected_loss: number;
- funnels_query?: (FunnelsQuery | null) | undefined;
- insight: Array<Array<Record<string, unknown>>>;
- kind?: string | undefined;
- probability: Record<string, number>;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: (number | null) | undefined;
- variants: Array<ExperimentVariantFunnelsBaseStats>;
- warnings?: (Array<DataWarehouseSyncWarning> | null) | undefined;
- };
- export type Response17 = {
- count_query?: (TrendsQuery | null) | undefined;
- credible_intervals: Record<string, Array<number>>;
- exposure_query?: (TrendsQuery | null) | undefined;
- insight: Array<Record<string, unknown>>;
- kind?: string | undefined;
- p_value: number;
- probability: Record<string, number>;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: (number | null) | undefined;
- variants: Array<ExperimentVariantTrendsBaseStats>;
- warnings?: (Array<DataWarehouseSyncWarning> | null) | undefined;
- };
export type LLMSentimentMessage = {
label: string;
score: number;
@@ -7419,7 +7392,7 @@ export namespace Schemas {
traceName?: (string | null) | undefined;
webSearchCost?: (number | null) | undefined;
};
- export type Response18 = {
+ export type Response16 = {
columns?: (Array<string> | null) | undefined;
error?: (string | null) | undefined;
hasMore?: (boolean | null) | undefined;
@@ -7443,7 +7416,7 @@ export namespace Schemas {
> | null)
| undefined;
};
- export type Response20 = {
+ export type Response18 = {
columns?: (Array<unknown> | null) | undefined;
error?: (string | null) | undefined;
hasMore?: (boolean | null) | undefined;
@@ -7468,7 +7441,7 @@ export namespace Schemas {
> | null)
| undefined;
};
- export type Response21 = {
+ export type Response19 = {
columns: Array<unknown>;
error?: (string | null) | undefined;
hasMore?: (boolean | null) | undefined;
@@ -7498,7 +7471,7 @@ export namespace Schemas {
> | null)
| undefined;
};
- export type Response22 = {
+ export type Response20 = {
error?: (string | null) | undefined;
hasMore: boolean;
hogql?: (string | null) | undefined;
@@ -8592,58 +8565,6 @@ export namespace Schemas {
tags?: (QueryLogTags | null) | undefined;
version?: (number | null) | undefined;
};
- export type ExperimentFunnelsQueryResponse = {
- credible_intervals: Record<string, Array<number>>;
- expected_loss: number;
- funnels_query?: (FunnelsQuery | null) | undefined;
- insight: Array<Array<Record<string, unknown>>>;
- kind?: string | undefined;
- probability: Record<string, number>;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: (number | null) | undefined;
- variants: Array<ExperimentVariantFunnelsBaseStats>;
- warnings?: (Array<DataWarehouseSyncWarning> | null) | undefined;
- };
- export type ExperimentFunnelsQuery = {
- experiment_id?: (number | null) | undefined;
- fingerprint?: (string | null) | undefined;
- funnels_query: FunnelsQuery;
- kind?: string | undefined;
- modifiers?: (HogQLQueryModifiers | null) | undefined;
- name?: (string | null) | undefined;
- response?: (ExperimentFunnelsQueryResponse | null) | undefined;
- tags?: (QueryLogTags | null) | undefined;
- uuid?: (string | null) | undefined;
- version?: (number | null) | undefined;
- };
- export type ExperimentTrendsQueryResponse = {
- count_query?: (TrendsQuery | null) | undefined;
- credible_intervals: Record<string, Array<number>>;
- exposure_query?: (TrendsQuery | null) | undefined;
- insight: Array<Record<string, unknown>>;
- kind?: string | undefined;
- p_value: number;
- probability: Record<string, number>;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: (number | null) | undefined;
- variants: Array<ExperimentVariantTrendsBaseStats>;
- warnings?: (Array<DataWarehouseSyncWarning> | null) | undefined;
- };
- export type ExperimentTrendsQuery = {
- count_query: TrendsQuery;
- experiment_id?: (number | null) | undefined;
- exposure_query?: (TrendsQuery | null) | undefined;
- fingerprint?: (string | null) | undefined;
- kind?: string | undefined;
- modifiers?: (HogQLQueryModifiers | null) | undefined;
- name?: (string | null) | undefined;
- response?: (ExperimentTrendsQueryResponse | null) | undefined;
- tags?: (QueryLogTags | null) | undefined;
- uuid?: (string | null) | undefined;
- version?: (number | null) | undefined;
- };
export type TracesQueryResponse = {
columns?: (Array<string> | null) | undefined;
error?: (string | null) | undefined;
@@ -8900,11 +8821,9 @@ export namespace Schemas {
| Response14
| Response15
| Response16
- | Response17
| Response18
+ | Response19
| Response20
- | Response21
- | Response22
| null
)
| undefined;
@@ -8956,8 +8875,6 @@ export namespace Schemas {
| MarketingAnalyticsAggregatedQuery
| ErrorTrackingQuery
| ErrorTrackingIssueCorrelationQuery
- | ExperimentFunnelsQuery
- | ExperimentTrendsQuery
| TracesQuery
| TraceQuery
| SessionQuery
diff --git a/products/experiments/backend/experiment_service.py b/products/experiments/backend/experiment_service.py
index 422877c71bd8..8d11b0b6a39b 100644
--- a/products/experiments/backend/experiment_service.py
+++ b/products/experiments/backend/experiment_service.py
@@ -87,6 +87,7 @@ from products.experiments.backend.models.experiment import (
EXPOSURE_FROZEN_COHORT_KEY,
EXPOSURE_FROZEN_GROUP_KEY,
EXPOSURE_FROZEN_GROUP_MARKER,
+ LEGACY_METRIC_KINDS,
Experiment,
ExperimentHoldout,
ExperimentSavedMetric,
@@ -1033,6 +1034,14 @@ class ExperimentService:
if saved_metrics.count() != len(saved_metrics_ids):
raise ValidationError("Saved metric does not exist or does not belong to this project")
+ # A linked legacy shared metric turns the whole experiment legacy, which hides all of its results.
+ legacy_names = sorted(saved_metrics.filter(query__kind__in=LEGACY_METRIC_KINDS).values_list("name", flat=True))
+ if legacy_names:
+ raise ValidationError(
+ f"Legacy shared metrics can't be added to an experiment: {', '.join(legacy_names)}. "
+ "Use a shared metric of kind 'ExperimentMetric' instead."
+ )
+
@staticmethod
def saved_metric_calculation_keys(experiment: Experiment) -> dict[int, str]:
"""The calculation key of each saved metric linked to the experiment, by link id.
@@ -3902,7 +3911,7 @@ class ExperimentService:
f"Cannot update: {', '.join(sorted(disallowed_fields))}. "
f"To change these, migrate the experiment to the new experiments engine first: "
f"POST /api/projects/{experiment.team_id}/experiments/{experiment.id}/migrate "
- f"(the experiment-migrate tool). It keeps this experiment and its results, and returns a new one."
+ f"(the experiment-migrate tool). It keeps this experiment and returns a new one."
)
# Validate end_date if present
diff --git a/products/experiments/backend/hogql_queries/__init__.py b/products/experiments/backend/hogql_queries/__init__.py
index 5c761c28776e..d0e9e44c4e3f 100644
--- a/products/experiments/backend/hogql_queries/__init__.py
+++ b/products/experiments/backend/hogql_queries/__init__.py
@@ -17,11 +17,3 @@ def get_baseline_variant_key(stats_config: dict | None, variant_keys: list[str])
# Variant key for an entity exposed to more than one variant
MULTIPLE_VARIANT_KEY = "$multiple"
-
-# Minimum number of people exposed to a variant before the results can be significant
-FF_DISTRIBUTION_THRESHOLD = 100
-
-# A variant with a win probability below this threshold is not significant
-MIN_PROBABILITY_FOR_SIGNIFICANCE = 0.9
-
-EXPECTED_LOSS_SIGNIFICANCE_LEVEL = 0.01
diff --git a/products/experiments/backend/hogql_queries/experiment_funnels_query_runner.py b/products/experiments/backend/hogql_queries/experiment_funnels_query_runner.py
deleted file mode 100644
index f3e83df1fb22..000000000000
--- a/products/experiments/backend/hogql_queries/experiment_funnels_query_runner.py
+++ /dev/null
@@ -1,214 +0,0 @@
-import json
-from datetime import UTC, datetime, timedelta
-from typing import Any, Optional, cast
-from zoneinfo import ZoneInfo
-
-from rest_framework.exceptions import ValidationError
-
-from posthog.schema import (
- BreakdownFilter,
- CachedExperimentFunnelsQueryResponse,
- DateRange,
- ExperimentFunnelsQuery,
- ExperimentFunnelsQueryResponse,
- ExperimentSignificanceCode,
- ExperimentVariantFunnelsBaseStats,
- FunnelLayout,
- FunnelsFilter,
- FunnelsQuery,
- FunnelsQueryResponse,
-)
-
-from posthog.hogql import ast
-
-from posthog.clickhouse.query_tagging import tag_queries
-from posthog.constants import ExperimentNoResultsErrorKeys
-from posthog.hogql_queries.query_runner import QueryRunner
-
-from products.experiments.backend.hogql_queries import CONTROL_VARIANT_KEY
-from products.experiments.backend.hogql_queries.funnels_statistics_v2 import (
- are_results_significant_v2,
- calculate_credible_intervals_v2,
- calculate_probabilities_v2,
-)
-from products.experiments.backend.models.experiment import Experiment
-from products.product_analytics.backend.facade.queries import FunnelsQueryRunner
-
-
-class ExperimentFunnelsQueryRunner(QueryRunner):
- query: ExperimentFunnelsQuery
- cached_response: CachedExperimentFunnelsQueryResponse
-
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
-
- if not self.query.experiment_id:
- raise ValidationError("experiment_id is required")
-
- self.experiment = Experiment.objects.get(id=self.query.experiment_id, team=self.team)
- self.feature_flag = self.experiment.feature_flag
- self.feature_flag_key = self.feature_flag.key_without_tombstone()
- self.variants = [variant["key"] for variant in self.feature_flag.variants]
- if self.experiment.holdout:
- self.variants.append(f"holdout-{self.experiment.holdout.id}")
-
- self.prepared_funnels_query = self._prepare_funnel_query()
- self.funnels_query_runner = FunnelsQueryRunner(
- query=self.prepared_funnels_query, team=self.team, timings=self.timings, limit_context=self.limit_context
- )
-
- def _calculate(self) -> ExperimentFunnelsQueryResponse:
- tag_queries(
- query_type="ExperimentFunnelsQuery",
- experiment_id=self.experiment.id,
- experiment_name=self.experiment.name,
- experiment_feature_flag_key=self.feature_flag_key,
- )
-
- funnels_result = self.funnels_query_runner.calculate()
-
- self._validate_event_variants(funnels_result)
-
- try:
- funnels_result.results = [
- result for result in funnels_result.results if result[0]["breakdown_value"][0] in self.variants
- ]
-
- control_variant, test_variants = self._get_variants_with_base_stats(funnels_result)
- probabilities = calculate_probabilities_v2(control_variant, test_variants)
- significance_code, loss = are_results_significant_v2(control_variant, test_variants, probabilities)
- credible_intervals = calculate_credible_intervals_v2([control_variant, *test_variants])
- except Exception as e:
- raise ValueError(f"Error calculating experiment funnel results: {str(e)}") from e
-
- return ExperimentFunnelsQueryResponse(
- kind="ExperimentFunnelsQuery",
- funnels_query=self.prepared_funnels_query,
- insight=funnels_result.results,
- variants=[variant.model_dump() for variant in [control_variant, *test_variants]],
- probability={
- variant.key: probability
- for variant, probability in zip([control_variant, *test_variants], probabilities)
- },
- significant=significance_code == ExperimentSignificanceCode.SIGNIFICANT,
- significance_code=significance_code,
- stats_version=2,
- expected_loss=loss,
- credible_intervals=credible_intervals,
- )
-
- def _prepare_funnel_query(self) -> FunnelsQuery:
- """
- Adapts the raw funnel query for experiment analysis:
-
- 1. Set the date range to match the experiment's duration, using the project's timezone.
- 2. Break down by the feature flag key, to separate the results for each variant.
- """
- prepared_funnels_query = FunnelsQuery(**self.query.funnels_query.model_dump())
-
- if self.team.timezone:
- tz = ZoneInfo(self.team.timezone)
- start_date = self.experiment.start_date.astimezone(tz) if self.experiment.start_date else None
- end_date = self.experiment.end_date.astimezone(tz) if self.experiment.end_date else None
- else:
- start_date = self.experiment.start_date
- end_date = self.experiment.end_date
-
- prepared_funnels_query.dateRange = DateRange(
- date_from=start_date.isoformat() if start_date else None,
- date_to=end_date.isoformat() if end_date else None,
- explicitDate=True,
- )
-
- prepared_funnels_query.breakdownFilter = BreakdownFilter(
- breakdown=f"$feature/{self.feature_flag_key}",
- breakdown_type="event",
- )
-
- if prepared_funnels_query.funnelsFilter is None:
- prepared_funnels_query.funnelsFilter = FunnelsFilter()
- prepared_funnels_query.funnelsFilter.layout = FunnelLayout.VERTICAL
-
- return prepared_funnels_query
-
- def _get_variants_with_base_stats(
- self, funnels_result: FunnelsQueryResponse
- ) -> tuple[ExperimentVariantFunnelsBaseStats, list[ExperimentVariantFunnelsBaseStats]]:
- control_variant: Optional[ExperimentVariantFunnelsBaseStats] = None
- test_variants = []
-
- for result in funnels_result.results:
- result_dict = cast(list[dict[str, Any]], result)
- first_step = result_dict[0]
- last_step = result_dict[-1]
-
- total = first_step.get("count", 0)
- success = last_step.get("count", 0) if len(result_dict) > 1 else 0
- failure = total - success
-
- breakdown_value = cast(list[str], first_step["breakdown_value"])[0]
-
- if breakdown_value == CONTROL_VARIANT_KEY:
- control_variant = ExperimentVariantFunnelsBaseStats(
- key=breakdown_value,
- success_count=int(success),
- failure_count=int(failure),
- )
- else:
- test_variants.append(
- ExperimentVariantFunnelsBaseStats(
- key=breakdown_value, success_count=int(success), failure_count=int(failure)
- )
- )
-
- if control_variant is None:
- raise ValueError("Control variant not found in count results")
-
- return control_variant, test_variants
-
- def _validate_event_variants(self, funnels_result: FunnelsQueryResponse):
- errors = {
- ExperimentNoResultsErrorKeys.NO_CONTROL_VARIANT: True,
- ExperimentNoResultsErrorKeys.NO_TEST_VARIANT: True,
- }
-
- if not funnels_result.results or not funnels_result.results:
- raise ValidationError(code="no-results", detail=json.dumps(errors))
-
- # Funnels: the first step must be present for *any* results to show up
- eventsWithOrderZero = []
- for eventArr in funnels_result.results:
- for event in eventArr:
- event_dict = cast(dict[str, Any], event)
- if event_dict.get("order") == 0:
- eventsWithOrderZero.append(event_dict)
-
- for event in eventsWithOrderZero:
- event_variant = event.get("breakdown_value", [None])[0]
- if event_variant == "control":
- errors[ExperimentNoResultsErrorKeys.NO_CONTROL_VARIANT] = False
- break
-
- test_variants = [variant for variant in self.variants if variant != "control"]
- for event in eventsWithOrderZero:
- event_variant = event.get("breakdown_value", [None])[0]
- if event_variant in test_variants:
- errors[ExperimentNoResultsErrorKeys.NO_TEST_VARIANT] = False
- break
-
- has_errors = any(errors.values())
- if has_errors:
- raise ValidationError(detail=json.dumps(errors))
-
- def to_query(self) -> ast.SelectQuery:
- raise ValueError(f"Cannot convert source query of type {self.query.funnels_query.kind} to query")
-
- def cache_target_age(self, last_refresh: Optional[datetime], lazy: bool = False) -> Optional[datetime]:
- if last_refresh is None:
- return None
- return last_refresh + timedelta(hours=24)
-
- def _is_stale(self, last_refresh: Optional[datetime], lazy: bool = False) -> bool:
- if not last_refresh:
- return True
- return (datetime.now(UTC) - last_refresh) > timedelta(hours=24)
diff --git a/products/experiments/backend/hogql_queries/experiment_trends_query_runner.py b/products/experiments/backend/hogql_queries/experiment_trends_query_runner.py
deleted file mode 100644
index 820397d822f9..000000000000
--- a/products/experiments/backend/hogql_queries/experiment_trends_query_runner.py
+++ /dev/null
@@ -1,422 +0,0 @@
-import json
-import threading
-from datetime import UTC, datetime, timedelta
-from typing import Any, Optional
-from zoneinfo import ZoneInfo
-
-from django.conf import settings
-
-from rest_framework.exceptions import ValidationError
-
-from posthog.schema import (
- BaseMathType,
- BreakdownFilter,
- CachedExperimentTrendsQueryResponse,
- ChartDisplayType,
- DataWarehouseNode,
- DataWarehousePropertyFilter,
- DateRange,
- EventPropertyFilter,
- EventsNode,
- ExperimentSignificanceCode,
- ExperimentTrendsQuery,
- ExperimentTrendsQueryResponse,
- ExperimentVariantTrendsBaseStats,
- PropertyMathType,
- PropertyOperator,
- TrendsFilter,
- TrendsQuery,
- TrendsQueryResponse,
-)
-
-from posthog.hogql import ast, query_stats
-from posthog.hogql.query_stats import QueryStats
-
-from posthog.clickhouse.query_tagging import tag_queries
-from posthog.constants import ExperimentNoResultsErrorKeys
-from posthog.hogql_queries.math_functions import ALL_SUPPORTED_MATH_FUNCTIONS
-from posthog.hogql_queries.query_runner import QueryRunner
-
-from products.experiments.backend.hogql_queries import CONTROL_VARIANT_KEY
-from products.experiments.backend.hogql_queries.trends_statistics_v2_continuous import (
- are_results_significant_v2_continuous,
- calculate_credible_intervals_v2_continuous,
- calculate_probabilities_v2_continuous,
-)
-from products.experiments.backend.hogql_queries.trends_statistics_v2_count import (
- are_results_significant_v2_count,
- calculate_credible_intervals_v2_count,
- calculate_probabilities_v2_count,
-)
-from products.experiments.backend.hogql_queries.types import ExperimentMetricType
-from products.experiments.backend.models.experiment import Experiment
-from products.product_analytics.backend.facade.queries import TrendsQueryRunner
-
-
-class ExperimentTrendsQueryRunner(QueryRunner):
- query: ExperimentTrendsQuery
- cached_response: CachedExperimentTrendsQueryResponse
-
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
-
- if not self.query.experiment_id:
- raise ValidationError("experiment_id is required")
-
- self.experiment = Experiment.objects.get(id=self.query.experiment_id, team=self.team)
- self.feature_flag = self.experiment.feature_flag
- self.feature_flag_key = self.feature_flag.key_without_tombstone()
- self.variants = [variant["key"] for variant in self.feature_flag.variants]
- if self.experiment.holdout:
- self.variants.append(f"holdout-{self.experiment.holdout.id}")
- self.breakdown_key = f"$feature/{self.feature_flag_key}"
-
- self._fix_math_aggregation()
-
- self.prepared_count_query = self._prepare_count_query()
- self.prepared_exposure_query = self._prepare_exposure_query()
-
- # The two runners run on separate threads and HogQLTimings is not thread safe, so each one
- # gets its own clone. _calculate merges them back once both threads have joined.
- self.count_query_runner = TrendsQueryRunner(
- query=self.prepared_count_query,
- team=self.team,
- timings=self.timings.clone_for_subquery(0),
- limit_context=self.limit_context,
- )
- self.exposure_query_runner = TrendsQueryRunner(
- query=self.prepared_exposure_query,
- team=self.team,
- timings=self.timings.clone_for_subquery(1),
- limit_context=self.limit_context,
- )
-
- def _uses_math_aggregation_by_user_or_property_value(self, query: TrendsQuery):
- math_keys = ALL_SUPPORTED_MATH_FUNCTIONS
- # "sum" works with a custom exposure query, so it needs no special handling.
- if "sum" in math_keys:
- math_keys.remove("sum")
- return any(entity.math in math_keys for entity in query.series)
-
- def _fix_math_aggregation(self):
- """
- Switch unsupported math aggregations to SUM
- """
- uses_math_aggregation = self._uses_math_aggregation_by_user_or_property_value(self.query.count_query)
- if uses_math_aggregation:
- self.query.count_query.series[0].math = PropertyMathType.SUM
-
- def _get_date_range(self) -> DateRange:
- if self.team.timezone:
- tz = ZoneInfo(self.team.timezone)
- start_date = self.experiment.start_date.astimezone(tz) if self.experiment.start_date else None
- end_date = self.experiment.end_date.astimezone(tz) if self.experiment.end_date else None
- else:
- start_date = self.experiment.start_date
- end_date = self.experiment.end_date
-
- return DateRange(
- date_from=start_date.isoformat() if start_date else None,
- date_to=end_date.isoformat() if end_date else None,
- explicitDate=True,
- )
-
- def _get_event_breakdown_filter(self) -> BreakdownFilter:
- return BreakdownFilter(
- breakdown=self.breakdown_key,
- breakdown_type="event",
- )
-
- def _get_data_warehouse_breakdown_filter(self) -> BreakdownFilter:
- return BreakdownFilter(
- breakdown=f"events.properties.{self.breakdown_key}",
- breakdown_type="data_warehouse",
- )
-
- def _get_metric_type(self) -> ExperimentMetricType:
- match self.query.count_query.series[0].math:
- case PropertyMathType.SUM | "hogql":
- return ExperimentMetricType.CONTINUOUS
- case _:
- return ExperimentMetricType.COUNT
-
- def _prepare_count_query(self) -> TrendsQuery:
- """
- Adapt the raw trends query for experiment analysis. The date range matches the experiment's
- duration, and the breakdown on the feature flag property splits the results by variant.
- """
- prepared_count_query = TrendsQuery(**self.query.count_query.model_dump())
-
- prepared_count_query.trendsFilter = TrendsFilter(display=ChartDisplayType.ACTIONS_LINE_GRAPH_CUMULATIVE)
- prepared_count_query.dateRange = self._get_date_range()
- if self._is_data_warehouse_query(prepared_count_query):
- prepared_count_query.breakdownFilter = self._get_data_warehouse_breakdown_filter()
- prepared_count_query.properties = [
- DataWarehousePropertyFilter(
- key="events.event",
- value="$feature_flag_called",
- operator=PropertyOperator.EXACT,
- type="data_warehouse",
- ),
- DataWarehousePropertyFilter(
- key=f"events.properties.{self.breakdown_key}",
- value=self.variants,
- operator=PropertyOperator.EXACT,
- type="data_warehouse",
- ),
- ]
- else:
- prepared_count_query.breakdownFilter = self._get_event_breakdown_filter()
- prepared_count_query.properties = [
- EventPropertyFilter(
- key=self.breakdown_key,
- value=self.variants,
- operator=PropertyOperator.EXACT,
- type="event",
- )
- ]
-
- return prepared_count_query
-
- def _prepare_exposure_query(self) -> TrendsQuery:
- """
- Exposure is the count of users who saw the experiment, which the significance calculation needs.
-
- A custom exposure query is used as is, with the experiment's date range and breakdown applied.
- Otherwise, and always for data warehouse metrics, the default query counts unique users with a
- $feature_flag_called event.
- """
-
- prepared_count_query = TrendsQuery(**self.query.count_query.model_dump())
-
- if self.query.exposure_query and not self._is_data_warehouse_query(prepared_count_query):
- prepared_exposure_query = TrendsQuery(**self.query.exposure_query.model_dump())
- prepared_exposure_query.dateRange = self._get_date_range()
- prepared_exposure_query.trendsFilter = TrendsFilter(display=ChartDisplayType.ACTIONS_LINE_GRAPH_CUMULATIVE)
- prepared_exposure_query.breakdownFilter = self._get_event_breakdown_filter()
- prepared_exposure_query.properties = [
- EventPropertyFilter(
- key=self.breakdown_key,
- value=self.variants,
- operator=PropertyOperator.EXACT,
- type="event",
- )
- ]
- else:
- prepared_exposure_query = TrendsQuery(
- dateRange=self._get_date_range(),
- trendsFilter=TrendsFilter(display=ChartDisplayType.ACTIONS_LINE_GRAPH_CUMULATIVE),
- breakdownFilter=BreakdownFilter(
- breakdown="$feature_flag_response",
- breakdown_type="event",
- ),
- series=[
- EventsNode(
- event="$feature_flag_called",
- math=BaseMathType.DAU, # TODO sync with frontend!!!
- )
- ],
- properties=[
- EventPropertyFilter(
- key="$feature_flag_response",
- value=self.variants,
- operator=PropertyOperator.EXACT,
- type="event",
- ),
- EventPropertyFilter(
- key="$feature_flag",
- value=[self.feature_flag_key],
- operator=PropertyOperator.EXACT,
- type="event",
- ),
- ],
- filterTestAccounts=self.query.count_query.filterTestAccounts,
- )
-
- return prepared_exposure_query
-
- def _calculate(self) -> ExperimentTrendsQueryResponse:
- tag_queries(
- query_type="ExperimentTrendsQuery",
- experiment_id=str(self.experiment.id),
- experiment_name=self.experiment.name,
- experiment_feature_flag_key=self.feature_flag_key,
- )
-
- shared_results: dict[str, Optional[Any]] = {"count_result": None, "exposure_result": None}
- errors = []
-
- def run(
- query_runner: TrendsQueryRunner,
- result_key: str,
- is_parallel: bool,
- stats: Optional[QueryStats] = None,
- ):
- try:
- # A thread starts with no scope, so the totals are handed over, or the response
- # under-reports what ClickHouse read.
- with query_stats.use(stats):
- result = query_runner.calculate()
- shared_results[result_key] = result
- except Exception as e:
- errors.append(e)
- finally:
- if is_parallel:
- from django.db import connection
-
- # This closes only the DB connection of this thread, not the connections of the app.
- connection.close()
-
- # This exists so that we're not spawning threads during unit tests
- if settings.IN_UNIT_TESTING:
- run(self.count_query_runner, "count_result", False)
- run(self.exposure_query_runner, "exposure_result", False)
- else:
- stats = query_stats.get_active()
- jobs = [
- threading.Thread(target=run, args=(self.count_query_runner, "count_result", True, stats)),
- threading.Thread(target=run, args=(self.exposure_query_runner, "exposure_result", True, stats)),
- ]
- [j.start() for j in jobs] # type: ignore
- [j.join() for j in jobs] # type: ignore
-
- self.timings.timings.update(self.count_query_runner.timings.timings)
- self.timings.timings.update(self.exposure_query_runner.timings.timings)
-
- if errors:
- raise errors[0]
-
- count_result = shared_results["count_result"]
- exposure_result = shared_results["exposure_result"]
- if count_result is None or exposure_result is None:
- raise ValueError("One or both query runners failed to produce a response")
-
- self._validate_event_variants(count_result, exposure_result)
-
- control_variant, test_variants = self._get_variants_with_base_stats(count_result, exposure_result)
- match self._get_metric_type():
- case ExperimentMetricType.CONTINUOUS:
- probabilities = calculate_probabilities_v2_continuous(control_variant, test_variants)
- significance_code, p_value = are_results_significant_v2_continuous(
- control_variant, test_variants, probabilities
- )
- credible_intervals = calculate_credible_intervals_v2_continuous([control_variant, *test_variants])
- case ExperimentMetricType.COUNT:
- probabilities = calculate_probabilities_v2_count(control_variant, test_variants)
- significance_code, p_value = are_results_significant_v2_count(
- control_variant, test_variants, probabilities
- )
- credible_intervals = calculate_credible_intervals_v2_count([control_variant, *test_variants])
- case _:
- raise ValueError(f"Unsupported metric type: {self._get_metric_type()}")
-
- return ExperimentTrendsQueryResponse(
- kind="ExperimentTrendsQuery",
- insight=count_result.results,
- count_query=self.prepared_count_query,
- exposure_query=self.prepared_exposure_query,
- variants=[variant.model_dump() for variant in [control_variant, *test_variants]],
- probability={
- variant.key: probability
- for variant, probability in zip([control_variant, *test_variants], probabilities)
- },
- significant=significance_code == ExperimentSignificanceCode.SIGNIFICANT,
- significance_code=significance_code,
- stats_version=2,
- p_value=p_value,
- credible_intervals=credible_intervals,
- )
-
- def _get_variants_with_base_stats(
- self, count_results: TrendsQueryResponse, exposure_results: TrendsQueryResponse
- ) -> tuple[ExperimentVariantTrendsBaseStats, list[ExperimentVariantTrendsBaseStats]]:
- control_variant: Optional[ExperimentVariantTrendsBaseStats] = None
- test_variants = []
- exposure_counts = {}
- exposure_ratios = {}
-
- for result in exposure_results.results:
- count = result.get("count", 0)
- breakdown_value = result.get("breakdown_value")
- exposure_counts[breakdown_value] = count
-
- control_exposure = exposure_counts.get(CONTROL_VARIANT_KEY, 0)
-
- if control_exposure != 0:
- for key, count in exposure_counts.items():
- exposure_ratios[key] = count / control_exposure
-
- for result in count_results.results:
- count = result.get("count", 0)
- breakdown_value = result.get("breakdown_value")
- if breakdown_value == CONTROL_VARIANT_KEY:
- absolute_exposure = exposure_counts.get(breakdown_value, 0)
- control_variant = ExperimentVariantTrendsBaseStats(
- key=breakdown_value,
- count=count,
- exposure=1,
- absolute_exposure=absolute_exposure,
- )
- else:
- absolute_exposure = exposure_counts.get(breakdown_value, 0)
- test_variants.append(
- ExperimentVariantTrendsBaseStats(
- key=breakdown_value,
- count=count,
- exposure=exposure_ratios.get(breakdown_value, 0),
- absolute_exposure=absolute_exposure,
- )
- )
-
- if control_variant is None:
- raise ValueError("Control variant not found in count results")
-
- return control_variant, test_variants
-
- def _validate_event_variants(self, count_result: TrendsQueryResponse, exposure_result: TrendsQueryResponse):
- errors = {
- ExperimentNoResultsErrorKeys.NO_EXPOSURES: True,
- ExperimentNoResultsErrorKeys.NO_CONTROL_VARIANT: True,
- ExperimentNoResultsErrorKeys.NO_TEST_VARIANT: True,
- }
-
- # Don't throw right away because we want to validate metric events too
- # If metric events pass, the end of the function will still throw an error
- if exposure_result.results:
- errors[ExperimentNoResultsErrorKeys.NO_EXPOSURES] = False
-
- if not count_result.results or not count_result.results[0]:
- raise ValidationError(code="no-results", detail=json.dumps(errors))
-
- for event in count_result.results:
- event_variant = event.get("breakdown_value")
- if event_variant == "control":
- errors[ExperimentNoResultsErrorKeys.NO_CONTROL_VARIANT] = False
- break
- test_variants = [variant for variant in self.variants if variant != "control"]
-
- for event in count_result.results:
- event_variant = event.get("breakdown_value")
- if event_variant in test_variants:
- errors[ExperimentNoResultsErrorKeys.NO_TEST_VARIANT] = False
- break
-
- has_errors = any(errors.values())
- if has_errors:
- raise ValidationError(detail=json.dumps(errors))
-
- def _is_data_warehouse_query(self, query: TrendsQuery) -> bool:
- return isinstance(query.series[0], DataWarehouseNode)
-
- def to_query(self) -> ast.SelectQuery:
- raise ValueError(f"Cannot convert source query of type {self.query.count_query.kind} to query")
-
- def cache_target_age(self, last_refresh: Optional[datetime], lazy: bool = False) -> Optional[datetime]:
- if last_refresh is None:
- return None
- return last_refresh + timedelta(hours=24)
-
- def _is_stale(self, last_refresh: Optional[datetime], lazy: bool = False) -> bool:
- if not last_refresh:
- return True
- return (datetime.now(UTC) - last_refresh) > timedelta(hours=24)
diff --git a/products/experiments/backend/hogql_queries/funnels_statistics_v2.py b/products/experiments/backend/hogql_queries/funnels_statistics_v2.py
deleted file mode 100644
index 497f3a01d19a..000000000000
--- a/products/experiments/backend/hogql_queries/funnels_statistics_v2.py
+++ /dev/null
@@ -1,130 +0,0 @@
-import numpy as np
-from scipy import stats
-from scipy.stats import betabinom
-
-from posthog.schema import ExperimentSignificanceCode, ExperimentVariantFunnelsBaseStats
-
-from products.experiments.backend.hogql_queries import (
- EXPECTED_LOSS_SIGNIFICANCE_LEVEL,
- FF_DISTRIBUTION_THRESHOLD,
- MIN_PROBABILITY_FOR_SIGNIFICANCE,
-)
-
-ALPHA_PRIOR = 1
-BETA_PRIOR = 1
-SAMPLE_SIZE = 10000
-
-
-def calculate_probabilities_v2(
- control: ExperimentVariantFunnelsBaseStats, variants: list[ExperimentVariantFunnelsBaseStats]
-) -> list[float]:
- """
- Monte Carlo win probabilities for funnel conversion rates.
-
- The Beta distribution is the conjugate prior for binomial (success/failure) data,
- so the posterior is also a Beta distribution and is easy to sample. The prior is
- Beta(1,1), which is uniform over [0, 1].
-
- Index 0 of the result is the probability that control beats the best test variant.
- Index i > 0 is the probability that test variant i-1 beats control.
- """
- all_variants = [control, *variants]
-
- samples: list[np.ndarray] = []
- for variant in all_variants:
- alpha = ALPHA_PRIOR + variant.success_count
- beta = BETA_PRIOR + variant.failure_count
- variant_samples = np.random.beta(alpha, beta, SAMPLE_SIZE)
- samples.append(variant_samples)
-
- samples_array = np.array(samples)
- probabilities = []
- control_samples = samples_array[0]
-
- # Find the best test variant at each sample point
- test_variants_samples = samples_array[1:]
- best_variant_samples = np.max(test_variants_samples, axis=0)
-
- control_prob = np.mean(control_samples >= best_variant_samples)
- probabilities.append(float(control_prob))
-
- for i in range(1, len(all_variants)):
- probability = np.mean(samples_array[i] > control_samples)
- probabilities.append(float(probability))
-
- return probabilities
-
-
-def calculate_expected_loss_v2(
- target_variant: ExperimentVariantFunnelsBaseStats, variants: list[ExperimentVariantFunnelsBaseStats]
-) -> float:
- """
- Expected loss in conversion rate when the target variant is chosen over the best
- of the other variants, from Beta-Binomial posterior samples.
- """
- target_alpha = int(ALPHA_PRIOR + target_variant.success_count)
- target_beta = int(BETA_PRIOR + target_variant.failure_count)
- target_n = int(target_variant.success_count + target_variant.failure_count)
-
- target_samples = betabinom.rvs(target_n, target_alpha, target_beta, size=SAMPLE_SIZE) / target_n
-
- variant_samples = []
- for variant in variants:
- n = int(variant.success_count + variant.failure_count)
- alpha = int(ALPHA_PRIOR + variant.success_count)
- beta = int(BETA_PRIOR + variant.failure_count)
- samples = betabinom.rvs(n, alpha, beta, size=SAMPLE_SIZE) / n
- variant_samples.append(samples)
-
- variant_max = np.maximum.reduce(variant_samples)
- losses = np.maximum(0, variant_max - target_samples)
- expected_loss = float(np.mean(losses))
-
- return expected_loss
-
-
-def are_results_significant_v2(
- control: ExperimentVariantFunnelsBaseStats,
- variants: list[ExperimentVariantFunnelsBaseStats],
- probabilities: list[float],
-) -> tuple[ExperimentSignificanceCode, float]:
- """
- Returns the significance code and the expected loss of the variant with the
- highest conversion rate. The expected loss is 1.0 when a check fails before
- the loss calculation.
- """
- if control.success_count + control.failure_count < FF_DISTRIBUTION_THRESHOLD or any(
- v.success_count + v.failure_count < FF_DISTRIBUTION_THRESHOLD for v in variants
- ):
- return ExperimentSignificanceCode.NOT_ENOUGH_EXPOSURE, 1.0
-
- max_probability = max(probabilities)
- if max_probability >= MIN_PROBABILITY_FOR_SIGNIFICANCE:
- all_variants = [control, *variants]
- conversion_rates = [v.success_count / (v.success_count + v.failure_count) for v in all_variants]
- best_idx = np.argmax(conversion_rates)
- best_variant = all_variants[best_idx]
- other_variants = all_variants[:best_idx] + all_variants[best_idx + 1 :]
- expected_loss = calculate_expected_loss_v2(best_variant, other_variants)
-
- if expected_loss >= EXPECTED_LOSS_SIGNIFICANCE_LEVEL:
- return ExperimentSignificanceCode.HIGH_LOSS, expected_loss
-
- return ExperimentSignificanceCode.SIGNIFICANT, expected_loss
-
- return ExperimentSignificanceCode.LOW_WIN_PROBABILITY, 1.0
-
-
-def calculate_credible_intervals_v2(variants: list[ExperimentVariantFunnelsBaseStats]) -> dict[str, list[float]]:
- """95% credible intervals for each variant's conversion rate, from the Beta posterior with a Beta(1,1) prior."""
- intervals = {}
-
- for variant in variants:
- alpha = ALPHA_PRIOR + variant.success_count
- beta = BETA_PRIOR + variant.failure_count
-
- lower, upper = stats.beta.ppf([0.025, 0.975], alpha, beta)
-
- intervals[variant.key] = [float(lower), float(upper)]
-
- return intervals
diff --git a/products/experiments/backend/hogql_queries/test/experiment_query_runner/test_funnel_metric.py b/products/experiments/backend/hogql_queries/test/experiment_query_runner/test_funnel_metric.py
index 8b67557e2c9d..aa77acf3376d 100644
--- a/products/experiments/backend/hogql_queries/test/experiment_query_runner/test_funnel_metric.py
+++ b/products/experiments/backend/hogql_queries/test/experiment_query_runner/test_funnel_metric.py
@@ -1,4 +1,3 @@
-import json
from datetime import datetime
from typing import cast
@@ -14,7 +13,6 @@ from posthog.test.base import (
from django.test import override_settings
from parameterized import parameterized
-from rest_framework.exceptions import ValidationError
from posthog.schema import (
ActionsNode,
@@ -30,7 +28,6 @@ from posthog.schema import (
StepOrderValue,
)
-from posthog.constants import ExperimentNoResultsErrorKeys
from posthog.models.filters.utils import GroupTypeIndex
from posthog.test.test_utils import create_group_type_mapping_without_created_at
@@ -678,47 +675,25 @@ class TestExperimentFunnelMetric(ExperimentQueryRunnerBaseTest):
self.team.save()
query_runner = ExperimentQueryRunner(query=experiment_query, team=self.team)
- if expected_results is None:
- with self.assertRaises(ValidationError) as context:
- query_runner.calculate()
-
- if "person_id_override_properties_joined_filter_laterevent" in name:
- expected_errors = json.dumps(
- {
- ExperimentNoResultsErrorKeys.NO_EXPOSURES: False,
- ExperimentNoResultsErrorKeys.NO_CONTROL_VARIANT: False,
- ExperimentNoResultsErrorKeys.NO_TEST_VARIANT: True,
- }
- )
- else:
- expected_errors = json.dumps(
- {
- ExperimentNoResultsErrorKeys.NO_EXPOSURES: True,
- ExperimentNoResultsErrorKeys.NO_CONTROL_VARIANT: True,
- ExperimentNoResultsErrorKeys.NO_TEST_VARIANT: True,
- }
- )
- self.assertEqual(cast(list, context.exception.detail)[0], expected_errors)
- else:
- result = query_runner.calculate()
+ result = query_runner.calculate()
- assert result.variant_results is not None
- self.assertEqual(len(result.variant_results), 1)
+ assert result.variant_results is not None
+ self.assertEqual(len(result.variant_results), 1)
- control_variant = result.baseline
- assert control_variant is not None
- test_variant = result.variant_results[0]
- assert test_variant is not None
+ control_variant = result.baseline
+ assert control_variant is not None
+ test_variant = result.variant_results[0]
+ assert test_variant is not None
- self.assertEqual(
- {
- "control_success": int(control_variant.sum),
- "control_failure": int(control_variant.number_of_samples - control_variant.sum),
- "test_success": int(test_variant.sum),
- "test_failure": int(test_variant.number_of_samples - test_variant.sum),
- },
- expected_results,
- )
+ self.assertEqual(
+ {
+ "control_success": int(control_variant.sum),
+ "control_failure": int(control_variant.number_of_samples - control_variant.sum),
+ "test_success": int(test_variant.sum),
+ "test_failure": int(test_variant.number_of_samples - test_variant.sum),
+ },
+ expected_results,
+ )
@parameterized.expand(
[
diff --git a/products/experiments/backend/hogql_queries/trends_statistics_v2_continuous.py b/products/experiments/backend/hogql_queries/trends_statistics_v2_continuous.py
deleted file mode 100644
index c65daa6c08bf..000000000000
--- a/products/experiments/backend/hogql_queries/trends_statistics_v2_continuous.py
+++ /dev/null
@@ -1,199 +0,0 @@
-import numpy as np
-from rest_framework.exceptions import ValidationError
-from scipy.stats import t
-
-from posthog.schema import ExperimentSignificanceCode, ExperimentVariantTrendsBaseStats
-
-from posthog.exceptions_capture import capture_exception
-
-from products.experiments.backend.hogql_queries import (
- EXPECTED_LOSS_SIGNIFICANCE_LEVEL,
- FF_DISTRIBUTION_THRESHOLD,
- MIN_PROBABILITY_FOR_SIGNIFICANCE,
-)
-
-# Prior parameters (minimal prior knowledge)
-MU_0 = 0.0 # Prior mean
-KAPPA_0 = 1.0 # Prior strength for mean
-ALPHA_0 = 1.0 # Prior shape for variance
-BETA_0 = 1.0 # Prior scale for variance
-
-LOG_VARIANCE = 0.75
-
-SAMPLE_SIZE = 10000
-EPSILON = 1e-10 # Keeps log() finite when a mean is zero
-
-
-def calculate_probabilities_v2_continuous(
- control_variant: ExperimentVariantTrendsBaseStats, test_variants: list[ExperimentVariantTrendsBaseStats]
-) -> list[float]:
- """
- Estimate win probabilities for a continuous metric (for example revenue) by sampling from
- each variant's posterior.
-
- `count` holds the metric total, so the per-user mean is count / absolute_exposure. The model
- works in log-space to handle right-skewed values, with a Normal-Inverse-Gamma prior and a
- fixed log-space variance (LOG_VARIANCE).
-
- Index 0 is the probability that control beats the best test variant.
- Index i > 0 is the probability that test variant i-1 beats control.
- """
- if len(test_variants) >= 10:
- raise ValidationError("Can't calculate experiment results for more than 10 variants", code="too_much_data")
- if len(test_variants) < 1:
- raise ValidationError("Can't calculate experiment results for less than 2 variants", code="no_data")
-
- mean_value_control = control_variant.count / control_variant.absolute_exposure
-
- log_control_mean = np.log(mean_value_control + EPSILON)
-
- kappa_n_control = KAPPA_0 + control_variant.absolute_exposure
- mu_n_control = (KAPPA_0 * MU_0 + control_variant.absolute_exposure * log_control_mean) / kappa_n_control
- alpha_n_control = ALPHA_0 + control_variant.absolute_exposure / 2
- beta_n_control = BETA_0 + 0.5 * control_variant.absolute_exposure * LOG_VARIANCE
-
- control_posterior = t(
- df=2 * alpha_n_control, loc=mu_n_control, scale=np.sqrt(beta_n_control / (kappa_n_control * alpha_n_control))
- )
- samples_control = control_posterior.rvs(SAMPLE_SIZE)
-
- test_samples = []
- for test in test_variants:
- mean_value_test = test.count / test.absolute_exposure
- log_test_mean = np.log(mean_value_test + EPSILON)
-
- kappa_n_test = KAPPA_0 + test.absolute_exposure
- mu_n_test = (KAPPA_0 * MU_0 + test.absolute_exposure * log_test_mean) / kappa_n_test
- alpha_n_test = ALPHA_0 + test.absolute_exposure / 2
- beta_n_test = BETA_0 + 0.5 * test.absolute_exposure * LOG_VARIANCE
-
- test_posterior = t(
- df=2 * alpha_n_test, loc=mu_n_test, scale=np.sqrt(beta_n_test / (kappa_n_test * alpha_n_test))
- )
- test_samples.append(test_posterior.rvs(SAMPLE_SIZE))
-
- probabilities = []
-
- best_test_samples = np.max(test_samples, axis=0)
- control_wins = samples_control > best_test_samples
- probabilities.append(float(np.mean(control_wins)))
-
- for test_sample in test_samples:
- variant_wins = test_sample > samples_control
- probabilities.append(float(np.mean(variant_wins)))
-
- return probabilities
-
-
-def are_results_significant_v2_continuous(
- control_variant: ExperimentVariantTrendsBaseStats,
- test_variants: list[ExperimentVariantTrendsBaseStats],
- probabilities: list[float],
-) -> tuple[ExperimentSignificanceCode, float]:
- """
- Return (significance code, expected loss). The expected loss is 1.0 for any result that is not significant.
- """
- for variant in test_variants:
- if variant.absolute_exposure < FF_DISTRIBUTION_THRESHOLD:
- return ExperimentSignificanceCode.NOT_ENOUGH_EXPOSURE, 1.0
-
- if control_variant.absolute_exposure < FF_DISTRIBUTION_THRESHOLD:
- return ExperimentSignificanceCode.NOT_ENOUGH_EXPOSURE, 1.0
-
- max_probability = max(probabilities)
-
- if max_probability >= MIN_PROBABILITY_FOR_SIGNIFICANCE:
- all_variants = [control_variant, *test_variants]
- means = [v.count for v in all_variants]
- best_idx = np.argmax(means)
- best_variant = all_variants[best_idx]
- other_variants = all_variants[:best_idx] + all_variants[best_idx + 1 :]
-
- expected_loss = calculate_expected_loss_v2_continuous(best_variant, other_variants)
-
- if expected_loss >= EXPECTED_LOSS_SIGNIFICANCE_LEVEL:
- return ExperimentSignificanceCode.HIGH_LOSS, expected_loss
-
- return ExperimentSignificanceCode.SIGNIFICANT, expected_loss
-
- return ExperimentSignificanceCode.LOW_WIN_PROBABILITY, 1.0
-
-
-def calculate_credible_intervals_v2_continuous(variants, lower_bound=0.025, upper_bound=0.975):
- """
- Credible interval of each variant's per-user mean. The interval is computed in log-space and
- transformed back to the original scale.
-
- Returns an empty dict if the calculation fails for any variant.
- """
- intervals = {}
-
- for variant in variants:
- try:
- mean_value = variant.count / variant.absolute_exposure
- log_mean = np.log(mean_value + EPSILON)
-
- kappa_n = KAPPA_0 + variant.absolute_exposure
- mu_n = (KAPPA_0 * MU_0 + variant.absolute_exposure * log_mean) / kappa_n
- alpha_n = ALPHA_0 + variant.absolute_exposure / 2
- beta_n = BETA_0 + 0.5 * variant.absolute_exposure * LOG_VARIANCE
-
- posterior = t(df=2 * alpha_n, loc=mu_n, scale=np.sqrt(beta_n / (kappa_n * alpha_n)))
-
- credible_interval = posterior.interval(upper_bound - lower_bound)
-
- intervals[variant.key] = (
- float(max(0, np.exp(credible_interval[0]) - EPSILON)),
- float(max(0, np.exp(credible_interval[1]) - EPSILON)),
- )
- except Exception as e:
- capture_exception(
- Exception(f"Error calculating credible interval for variant {variant.key}"),
- {"error": str(e)},
- )
- return {}
-
- return intervals
-
-
-def calculate_expected_loss_v2_continuous(
- target_variant: ExperimentVariantTrendsBaseStats, variants: list[ExperimentVariantTrendsBaseStats]
-) -> float:
- """
- Expected loss in per-user mean from choosing the target variant: the mean of
- max(0, best alternative - target) over posterior samples, in the original scale.
- """
- target_mean = target_variant.count / target_variant.absolute_exposure
- log_target_mean = np.log(target_mean + EPSILON)
-
- kappa_n_target = KAPPA_0 + target_variant.absolute_exposure
- mu_n_target = (KAPPA_0 * MU_0 + target_variant.absolute_exposure * log_target_mean) / kappa_n_target
- alpha_n_target = ALPHA_0 + target_variant.absolute_exposure / 2
- beta_n_target = BETA_0 + 0.5 * target_variant.absolute_exposure * LOG_VARIANCE
-
- target_posterior = t(
- df=2 * alpha_n_target, loc=mu_n_target, scale=np.sqrt(beta_n_target / (kappa_n_target * alpha_n_target))
- )
- target_samples = target_posterior.rvs(SAMPLE_SIZE)
-
- variant_samples = []
- for variant in variants:
- variant_mean = variant.count / variant.absolute_exposure
- log_variant_mean = np.log(variant_mean + EPSILON)
-
- kappa_n = KAPPA_0 + variant.absolute_exposure
- mu_n = (KAPPA_0 * MU_0 + variant.absolute_exposure * log_variant_mean) / kappa_n
- alpha_n = ALPHA_0 + variant.absolute_exposure / 2
- beta_n = BETA_0 + 0.5 * variant.absolute_exposure * LOG_VARIANCE
-
- variant_posterior = t(df=2 * alpha_n, loc=mu_n, scale=np.sqrt(beta_n / (kappa_n * alpha_n)))
- variant_samples.append(variant_posterior.rvs(SAMPLE_SIZE))
-
- target_samples = np.exp(target_samples) - EPSILON
- variant_samples = [np.exp(samples) - EPSILON for samples in variant_samples]
-
- variant_max = np.maximum.reduce(variant_samples)
- losses = np.maximum(0, variant_max - target_samples)
- expected_loss = float(np.mean(losses))
-
- return expected_loss
diff --git a/products/experiments/backend/hogql_queries/trends_statistics_v2_count.py b/products/experiments/backend/hogql_queries/trends_statistics_v2_count.py
deleted file mode 100644
index 9a0f38f12007..000000000000
--- a/products/experiments/backend/hogql_queries/trends_statistics_v2_count.py
+++ /dev/null
@@ -1,148 +0,0 @@
-import numpy as np
-from rest_framework.exceptions import ValidationError
-from scipy.stats import gamma
-
-from posthog.schema import ExperimentSignificanceCode, ExperimentVariantTrendsBaseStats
-
-from posthog.exceptions_capture import capture_exception
-
-from products.experiments.backend.hogql_queries import (
- EXPECTED_LOSS_SIGNIFICANCE_LEVEL,
- FF_DISTRIBUTION_THRESHOLD,
- MIN_PROBABILITY_FOR_SIGNIFICANCE,
-)
-
-Probability = float
-
-# Prior parameters (minimal prior knowledge)
-ALPHA_0 = 1
-BETA_0 = 1
-SAMPLE_SIZE = 10000
-
-
-def calculate_probabilities_v2_count(
- control_variant: ExperimentVariantTrendsBaseStats, test_variants: list[ExperimentVariantTrendsBaseStats]
-) -> list[float]:
- """
- Estimate win probabilities by sampling from each variant's Gamma posterior
- (Gamma-Poisson model with a Gamma(1, 1) prior).
-
- Index 0 is the probability that control beats the best test variant.
- Index i > 0 is the probability that test variant i-1 beats control.
- """
- if len(test_variants) >= 10:
- raise ValidationError("Can't calculate experiment results for more than 10 variants", code="too_much_data")
- if len(test_variants) < 1:
- raise ValidationError("Can't calculate experiment results for less than 2 variants", code="no_data")
-
- alpha_control = ALPHA_0 + control_variant.count
- beta_control = BETA_0 + control_variant.absolute_exposure
-
- samples_control = gamma.rvs(alpha_control, scale=1 / beta_control, size=SAMPLE_SIZE)
-
- test_samples = []
- for test in test_variants:
- alpha_test = ALPHA_0 + test.count
- beta_test = BETA_0 + test.absolute_exposure
- test_samples.append(gamma.rvs(alpha_test, scale=1 / beta_test, size=SAMPLE_SIZE))
-
- probabilities = []
-
- best_test_samples = np.max(test_samples, axis=0)
- control_wins = samples_control > best_test_samples
- probabilities.append(float(np.mean(control_wins)))
-
- for test_sample in test_samples:
- variant_wins = test_sample > samples_control
- probabilities.append(float(np.mean(variant_wins)))
-
- return probabilities
-
-
-def are_results_significant_v2_count(
- control_variant: ExperimentVariantTrendsBaseStats,
- test_variants: list[ExperimentVariantTrendsBaseStats],
- probabilities: list[Probability],
-) -> tuple[ExperimentSignificanceCode, Probability]:
- """
- Return (significance code, expected loss). The expected loss is 1.0 for any result that is not significant.
- """
- for variant in test_variants:
- if variant.absolute_exposure < FF_DISTRIBUTION_THRESHOLD:
- return ExperimentSignificanceCode.NOT_ENOUGH_EXPOSURE, 1.0
-
- if control_variant.absolute_exposure < FF_DISTRIBUTION_THRESHOLD:
- return ExperimentSignificanceCode.NOT_ENOUGH_EXPOSURE, 1.0
-
- max_probability = max(probabilities)
-
- if max_probability >= MIN_PROBABILITY_FOR_SIGNIFICANCE:
- all_variants = [control_variant, *test_variants]
- rates = [v.count / v.absolute_exposure for v in all_variants]
- best_idx = np.argmax(rates)
- best_variant = all_variants[best_idx]
- other_variants = all_variants[:best_idx] + all_variants[best_idx + 1 :]
-
- expected_loss = calculate_expected_loss_v2_count(best_variant, other_variants)
-
- if expected_loss >= EXPECTED_LOSS_SIGNIFICANCE_LEVEL:
- return ExperimentSignificanceCode.HIGH_LOSS, expected_loss
-
- return ExperimentSignificanceCode.SIGNIFICANT, expected_loss
-
- return ExperimentSignificanceCode.LOW_WIN_PROBABILITY, 1.0
-
-
-def calculate_credible_intervals_v2_count(variants, lower_bound=0.025, upper_bound=0.975):
- """
- Credible interval of each variant's rate (events per exposure), from its Gamma posterior.
-
- Returns an empty dict if the calculation fails for any variant.
- """
- intervals = {}
-
- for variant in variants:
- try:
- alpha_posterior = ALPHA_0 + variant.count
- beta_posterior = BETA_0 + variant.absolute_exposure
-
- credible_interval = gamma.ppf([lower_bound, upper_bound], alpha_posterior, scale=1 / beta_posterior)
-
- intervals[variant.key] = (float(credible_interval[0]), float(credible_interval[1]))
- except Exception as e:
- capture_exception(
- Exception(f"Error calculating credible interval for variant {variant.key}"),
- {"error": str(e)},
- )
- return {}
-
- return intervals
-
-
-def calculate_expected_loss_v2_count(
- target_variant: ExperimentVariantTrendsBaseStats, variants: list[ExperimentVariantTrendsBaseStats]
-) -> float:
- """
- Expected loss in rate from choosing the target variant: the mean of
- max(0, best alternative - target) over posterior samples.
-
- Gamma is the conjugate prior of the Poisson rate, so each posterior is
- Gamma(ALPHA_0 + count, BETA_0 + absolute_exposure).
- """
- target_alpha = ALPHA_0 + target_variant.count
- target_beta = BETA_0 + target_variant.absolute_exposure
-
- target_samples = gamma.rvs(target_alpha, scale=1 / target_beta, size=SAMPLE_SIZE)
-
- variant_samples = []
- for variant in variants:
- alpha = ALPHA_0 + variant.count
- beta = BETA_0 + variant.absolute_exposure
- samples = gamma.rvs(alpha, scale=1 / beta, size=SAMPLE_SIZE)
- variant_samples.append(samples)
-
- variant_max = np.maximum.reduce(variant_samples)
- losses = np.maximum(0, variant_max - target_samples)
- expected_loss = float(np.mean(losses))
-
- return expected_loss
diff --git a/products/experiments/backend/hogql_queries/types.py b/products/experiments/backend/hogql_queries/types.py
index 8fb0deba754d..a3b9332bdc85 100644
--- a/products/experiments/backend/hogql_queries/types.py
+++ b/products/experiments/backend/hogql_queries/types.py
@@ -1,10 +1,4 @@
-from enum import Enum, StrEnum
-
-
-class ExperimentMetricType(Enum):
- COUNT = "count"
- CONTINUOUS = "continuous"
- FUNNEL = "funnel"
+from enum import StrEnum
class PrecomputeSkipReason(StrEnum):
diff --git a/products/experiments/backend/hogql_queries/utils.py b/products/experiments/backend/hogql_queries/utils.py
index 93e6c875ad3b..7b6778c4f6fc 100644
--- a/products/experiments/backend/hogql_queries/utils.py
+++ b/products/experiments/backend/hogql_queries/utils.py
@@ -14,10 +14,8 @@ from posthog.schema import (
ExperimentStatsBase,
ExperimentStatsBaseValidated,
ExperimentStatsValidationFailure,
- ExperimentVariantFunnelsBaseStats,
ExperimentVariantResultBayesian,
ExperimentVariantResultFrequentist,
- ExperimentVariantTrendsBaseStats,
)
from posthog.hogql import ast
@@ -48,7 +46,7 @@ from products.experiments.stats.shared.statistics import (
logger = structlog.get_logger(__name__)
-V = TypeVar("V", ExperimentVariantTrendsBaseStats, ExperimentVariantFunnelsBaseStats, ExperimentStatsBase)
+V = TypeVar("V", bound=ExperimentStatsBase)
def get_experiment_query_debug(
diff --git a/products/experiments/backend/legacy_migration.py b/products/experiments/backend/legacy_migration.py
index 726a09609810..2cac0183243d 100644
--- a/products/experiments/backend/legacy_migration.py
+++ b/products/experiments/backend/legacy_migration.py
@@ -79,7 +79,7 @@ def migrate_experiment(
) -> ExperimentMigration:
"""Create a new-engine copy of a legacy experiment, or return the copy made earlier.
- The original is left untouched and keeps its results. Both experiments point at the same
+ The original is left untouched. Both experiments point at the same
feature flag, so the copy needs no new rollout.
Legacy shared metrics have to be migrated too. With migrate_shared_metrics they are migrated
diff --git a/products/experiments/backend/metric_utils.py b/products/experiments/backend/metric_utils.py
index 1ec589b0b3e0..2a2919306563 100644
--- a/products/experiments/backend/metric_utils.py
+++ b/products/experiments/backend/metric_utils.py
@@ -47,20 +47,6 @@ def get_default_metric_title(metric_dict: dict) -> str:
logger = logging.getLogger(__name__)
-# A legacy metric nests its query under a kind-specific key: ExperimentTrendsQuery under
-# `count_query`, ExperimentFunnelsQuery under `funnels_query`.
-LEGACY_METRIC_QUERY_KEYS = ("count_query", "funnels_query")
-
-
-def apply_metric_date_range(metric: dict[str, Any], date_range: dict[str, Any]) -> None:
- """Overwrite a legacy metric's nested query date range in place.
-
- Only a query that already carries a date range is rewritten, so the stored shape of a metric
- without one is preserved."""
- for key in LEGACY_METRIC_QUERY_KEYS:
- if metric.get(key, {}).get("dateRange"):
- metric[key]["dateRange"] = date_range
-
def refresh_action_names_in_metric(
query: dict[str, Any] | None,
diff --git a/products/experiments/backend/presentation/serializers.py b/products/experiments/backend/presentation/serializers.py
index 949761c34339..55d8ca143ab7 100644
--- a/products/experiments/backend/presentation/serializers.py
+++ b/products/experiments/backend/presentation/serializers.py
@@ -53,7 +53,7 @@ from products.experiments.backend.facade.timeseries import METRIC_BUILDERS, appl
from products.experiments.backend.hogql_queries.exposure_query_logic import resolve_default_exposure_event
from products.experiments.backend.llm_metric_templates import TEMPLATE_NAMES
from products.experiments.backend.metric_events import MetricSourceRole
-from products.experiments.backend.metric_utils import apply_metric_date_range, refresh_action_names_in_metric
+from products.experiments.backend.metric_utils import refresh_action_names_in_metric
from products.experiments.backend.models.experiment import (
Experiment,
ExperimentHoldout,
@@ -721,13 +721,6 @@ class ExperimentSerializer(ExperimentBaseSerializer):
@tracer.start_as_current_span("ExperimentSerializer.to_representation")
def to_representation(self, instance):
data = super().to_representation(instance)
- # Normalize query date ranges to the experiment's current range
- # Cribbed from ExperimentTrendsQuery
- new_date_range = {
- "date_from": data["start_date"] if data["start_date"] else "",
- "date_to": data["end_date"] if data["end_date"] else "",
- "explicitDate": True,
- }
# Refresh action names in inline metrics (metrics and metrics_secondary).
# The columns are nullable, so the keys can be present with a None value. Each call
@@ -739,11 +732,7 @@ class ExperimentSerializer(ExperimentBaseSerializer):
refreshed_metric = refresh_action_names_in_metric(metric, instance.team)
if refreshed_metric:
metrics_list[i] = refreshed_metric
- metric = refreshed_metric
-
- apply_metric_date_range(metric, new_date_range)
- # Update date ranges in saved metrics
# Note: Action name refresh is handled by ExperimentToSavedMetricSerializer.to_representation
saved_metrics = data.get("saved_metrics", [])
with tracer.start_as_current_span("ExperimentSerializer.saved_metric_fingerprints") as span:
@@ -751,8 +740,6 @@ class ExperimentSerializer(ExperimentBaseSerializer):
calculation_keys = ExperimentService.saved_metric_calculation_keys(instance) if saved_metrics else {}
for saved_metric in saved_metrics:
if saved_metric.get("query"):
- apply_metric_date_range(saved_metric["query"], new_date_range)
-
# Add fingerprint to saved metric returned from API so that the frontend knows what
# timeseries records to query. Computed on the effective definition (with the link
# overrides), the same dict the daily discovery fingerprints, so the chart read finds
diff --git a/products/experiments/backend/presentation/views.py b/products/experiments/backend/presentation/views.py
index 145f92d8a466..e854150991e6 100644
--- a/products/experiments/backend/presentation/views.py
+++ b/products/experiments/backend/presentation/views.py
@@ -1135,10 +1135,10 @@ class EnterpriseExperimentsViewSet(
Move a legacy experiment onto the new experiments engine.
Creates a new experiment with the same configuration and its metrics converted
- to the new format, and returns it. The legacy experiment is left untouched and
- keeps its results, so the project ends up with two experiments. Both point at
- the same feature flag, so no new rollout is needed and users keep the variant
- they already have.
+ to the new format, and returns it. Legacy experiments no longer show results,
+ so this is how to get results for one. The legacy experiment is left untouched,
+ so the project ends up with two experiments. Both point at the same feature
+ flag, so no new rollout is needed and users keep the variant they already have.
Legacy shared metrics used by the experiment are converted as part of the same
call. Each one gets a new shared metric, and the new experiment links to that.
diff --git a/products/experiments/backend/test/test_experiment_service.py b/products/experiments/backend/test/test_experiment_service.py
index 8b64c0a8eb59..c8cb51f5fa24 100644
--- a/products/experiments/backend/test/test_experiment_service.py
+++ b/products/experiments/backend/test/test_experiment_service.py
@@ -799,24 +799,38 @@ class TestExperimentService(APIBaseTest):
assert expected_error in str(ctx.exception)
- def test_create_experiment_rejects_saved_metrics_from_another_team(self) -> None:
- self._create_flag(key="saved-metrics-team-check")
- other_team = Team.objects.create(organization=self.organization, name="Other Team")
- saved_metric = ExperimentSavedMetric.objects.create(
- team=other_team,
- name="Other Team Metric",
- query={"kind": "ExperimentMetric", "metric_type": "count", "uuid": "other-uuid", "event": "$pageview"},
- )
+ @parameterized.expand(
+ [
+ (
+ "from_another_team",
+ True,
+ {"kind": "ExperimentMetric", "metric_type": "count", "uuid": "other-uuid", "event": "$pageview"},
+ "Saved metric does not exist or does not belong to this project",
+ ),
+ (
+ "legacy_query",
+ False,
+ {"kind": "ExperimentTrendsQuery", "count_query": {"kind": "TrendsQuery", "series": []}},
+ "Legacy shared metrics can't be added to an experiment: Unlinkable Metric",
+ ),
+ ]
+ )
+ def test_create_experiment_rejects_unlinkable_saved_metric(
+ self, _: str, from_other_team: bool, query: dict, expected_error: str
+ ) -> None:
+ self._create_flag(key="saved-metrics-link-check")
+ team = Team.objects.create(organization=self.organization, name="Other Team") if from_other_team else self.team
+ saved_metric = ExperimentSavedMetric.objects.create(team=team, name="Unlinkable Metric", query=query)
service = self._service()
with self.assertRaises(ValidationError) as ctx:
service.create_experiment(
- name="Wrong Team Metric",
- feature_flag_key="saved-metrics-team-check",
+ name="Unlinkable Metric Experiment",
+ feature_flag_key="saved-metrics-link-check",
saved_metrics_ids=[{"id": saved_metric.id, "metadata": {"type": "primary"}}],
)
- assert "Saved metric does not exist or does not belong to this project" in str(ctx.exception)
+ assert expected_error in str(ctx.exception)
@parameterized.expand(
[
diff --git a/products/experiments/frontend/generated/api.ts b/products/experiments/frontend/generated/api.ts
index 6ddad5ebcb72..aab5ec89c699 100644
--- a/products/experiments/frontend/generated/api.ts
+++ b/products/experiments/frontend/generated/api.ts
@@ -861,10 +861,10 @@ export const getExperimentsMigrateCreateUrl = (projectId: string, id: number) =>
* Move a legacy experiment onto the new experiments engine.
*
* Creates a new experiment with the same configuration and its metrics converted
- * to the new format, and returns it. The legacy experiment is left untouched and
- * keeps its results, so the project ends up with two experiments. Both point at
- * the same feature flag, so no new rollout is needed and users keep the variant
- * they already have.
+ * to the new format, and returns it. Legacy experiments no longer show results,
+ * so this is how to get results for one. The legacy experiment is left untouched,
+ * so the project ends up with two experiments. Both point at the same feature
+ * flag, so no new rollout is needed and users keep the variant they already have.
*
* Legacy shared metrics used by the experiment are converted as part of the same
* call. Each one gets a new shared metric, and the new experiment links to that.
diff --git a/products/experiments/mcp/tools.yaml b/products/experiments/mcp/tools.yaml
index 68fd1f88a431..91db7d3732ab 100644
--- a/products/experiments/mcp/tools.yaml
+++ b/products/experiments/mcp/tools.yaml
@@ -957,10 +957,10 @@ tools:
Move a legacy experiment onto the new experiments engine. This creates a NEW experiment with the same
- configuration and its metrics converted to the new format, and returns it. The legacy experiment is left
- untouched and keeps its results, so the project ends up with two experiments. Both point at the same feature
- flag, so no new rollout is needed and users keep the variant they already have. Tell the user about the
- second experiment before you call this.
+ configuration and its metrics converted to the new format, and returns it. Legacy experiments no longer show
+ results, so this is how a user gets results for one. The legacy experiment is left untouched, so the project
+ ends up with two experiments. Both point at the same feature flag, so no new rollout is needed and users
+ keep the variant they already have. Tell the user about the second experiment before you call this.
Legacy shared metrics used by the experiment are converted too. Each one gets a new shared metric, and the
diff --git a/products/experiments/skills/diagnosing-experiment-health/references/empty-experiment.md b/products/experiments/skills/diagnosing-experiment-health/references/empty-experiment.md
index 3e288f3f981e..cd7b88d6819c 100644
--- a/products/experiments/skills/diagnosing-experiment-health/references/empty-experiment.md
+++ b/products/experiments/skills/diagnosing-experiment-health/references/empty-experiment.md
@@ -354,22 +354,21 @@ A user who adds `$feature/<flag-key>` to metric events changes nothing in the re
Where the property does matter:
-- **Legacy experiments** (E13 in `mid-run-changes.md`) attribute metric events by `$feature/<flag-key>`, so events without it are not counted there.
+- **Legacy experiments** (E13 in `mid-run-changes.md`) attributed metric events by `$feature/<flag-key>`. They no longer show results, so migrate them instead.
- **A custom exposure event** needs it (B4).
- **The user's own insight or SQL** that filters or breaks down by `$feature/<flag-key>`.
It undercounts events from a server SDK, which adds the property only when the capture call is given the evaluated flags or asked to evaluate them `[MEDIUM]`.
It also overcounts in the other direction: the property is on events of everyone whose SDK holds the flag's value, including people who were never exposed, so it is not a filter for participants.
**Verify directly.** `is_legacy` in `experiment-get`.
-It is true when any primary, secondary or shared metric is legacy, and only a metric whose `kind` is `ExperimentTrendsQuery` or `ExperimentFunnelsQuery` attributes metric events by the property.
-When it is false, or the metric in question has another `kind`, look elsewhere for a missing conversion: B2 (ids), B8 (order), D1 in `numbers-vs-sql.md` (scope).
+It is true when any primary, secondary or shared metric is legacy.
+When it is false, look elsewhere for a missing conversion: B2 (ids), B8 (order), D1 in `numbers-vs-sql.md` (scope).
Part of the public docs still asks for the property on metric events.
The exposures page states the current rule.
<!-- Source for maintainers (may rot): build_variant_property in
-products/experiments/backend/hogql_queries/experiment_exposure_query_builder.py reads the property on the exposure side only;
-the legacy runners experiment_trends_query_runner.py and experiment_funnels_query_runner.py break down metric events by it.
+products/experiments/backend/hogql_queries/experiment_exposure_query_builder.py reads the property on the exposure side only.
Docs: https://posthog.com/docs/experiments/exposures#metric-events-dont-need-a-variant-property -->
## B12 — An exposure criteria filter that cannot match [MEDIUM]
diff --git a/products/experiments/skills/diagnosing-experiment-health/references/interpretation.md b/products/experiments/skills/diagnosing-experiment-health/references/interpretation.md
index d3a8708956d9..2a7e078b1568 100644
--- a/products/experiments/skills/diagnosing-experiment-health/references/interpretation.md
+++ b/products/experiments/skills/diagnosing-experiment-health/references/interpretation.md
@@ -184,6 +184,7 @@ PostHog defaults to Bayesian, unless the project's default method says otherwise
- **Legacy experiments.** An experiment with legacy metrics (`is_legacy` in `experiment-get`) uses an older engine with
different multivariate semantics and different significance gates. See E13 in `mid-run-changes.md`, and PostHog's
[legacy-methodology docs page](https://posthog.com/docs/experiments/legacy-methodology).
+ Legacy experiments no longer show results. Migrate them with `experiment-migrate`.
<!-- Source for maintainers (may rot): is_decisive in products/experiments/stats/bayesian/tests.py;
credible_interval in products/experiments/stats/bayesian/utils.py. -->
diff --git a/products/experiments/skills/diagnosing-experiment-health/references/mid-run-changes.md b/products/experiments/skills/diagnosing-experiment-health/references/mid-run-changes.md
index e8449a683f21..b4ff6ddb0b28 100644
--- a/products/experiments/skills/diagnosing-experiment-health/references/mid-run-changes.md
+++ b/products/experiments/skills/diagnosing-experiment-health/references/mid-run-changes.md
@@ -335,8 +335,7 @@ _Fix:_ update the SDK.
## E13 — Editability locks (legacy experiments, ended experiments) [HIGH]
- **Legacy experiments** (`is_legacy: true` in `experiment-get`) — only the name, the description and the end date can be edited.
- A "This is a legacy experiment. Metrics can no longer be edited." notice appears in the UI.
- Where it is rolled out, a second notice says that legacy results will stop being available.
+ Results are no longer calculated. The UI shows a warning banner with a "Migrate experiment" button.
- **Launched experiments** — the variant keys can't be edited (E4). If
edits are needed, duplicate (E15), or reset (E8) and re-launch.
diff --git a/products/experiments/skills/managing-experiment-lifecycle/SKILL.md b/products/experiments/skills/managing-experiment-lifecycle/SKILL.md
index 22a8e1cae192..fe923dcbdf01 100644
--- a/products/experiments/skills/managing-experiment-lifecycle/SKILL.md
+++ b/products/experiments/skills/managing-experiment-lifecycle/SKILL.md
@@ -214,10 +214,10 @@ Creating a new experiment and copying the metrics over produces a second feature
`experiment-migrate` reuses the original flag, so the migrated experiment keeps its audience from the first minute.
- **Preconditions**: the experiment must be legacy. A 400 says it is already on the new engine.
-- **What happens**: a new experiment is created with the same configuration and the metrics converted to the new format. The legacy one is left untouched and keeps its results, so the project ends up with two experiments on one feature flag.
+- **What happens**: a new experiment is created with the same configuration and the metrics converted to the new format. The legacy one is left untouched, so the project ends up with two experiments on one feature flag. Legacy experiments no longer show results, so migrating is the only way to get results for one.
- **Legacy shared metrics**: converted in the same call. Each gets a new shared metric that the migrated experiment links to.
- **Variants**: unchanged — the flag is shared, so users keep the variant they have.
-- **Analysis**: the migrated experiment reads the same exposures. Results are recomputed by the new engine, so numbers can differ from the legacy view.
+- **Analysis**: the migrated experiment reads the same exposures. Results are computed by the new engine, so numbers can differ from what the legacy view used to show.
**Tell the user there will be two experiments before you call it**, and link both afterwards.
Calling it again returns the experiment the first call created, so a retry is safe.
@@ -226,7 +226,7 @@ No request body.
A legacy experiment also refuses most edits: `experiment-update` returns 400 for anything but name, description and end_date.
Those three still work on the legacy experiment, so edit it directly and do not migrate for them.
-Migrate only when the user asks for it, or when a requested change touches a field the guard blocks, and then apply the change to the migrated experiment.
+Migrate only when the user asks for it, wants results for the experiment, or requests a change to a field the guard blocks. Apply that change to the migrated experiment.
## Decision framework
diff --git a/products/model_crossing_uses_baseline.txt b/products/model_crossing_uses_baseline.txt
index 9c1f46c2a65b..cbb5161c16dd 100644
--- a/products/model_crossing_uses_baseline.txt
+++ b/products/model_crossing_uses_baseline.txt
@@ -280,11 +280,9 @@ event_definitions.PropertyDefinition access_control.PropertyAccessControl.proper
event_definitions.PropertyDefinition ee.EnterprisePropertyDefinition.propertydefinition_ptr reverse-accessor(enterprisepropertydefinition) 1
event_definitions.PropertyDefinition posthog.MaterializedColumnSlot.property_definition reverse-accessor(materialized_column_slots) 1
experiments.Experiment products.experiments.backend.facade.replay.resolve_in_session_exposure_semantics facade-accepts(experiment) 1
-experiments:backend/hogql_queries/ ee.clickhouse.views.test.test_experiment_saved_metrics drives(ExperimentTrendsQuery) 2
experiments:backend/hogql_queries/ posthog.session_recordings.queries.test.listing_recordings.test_session_recordings_list_by_experiment_exposure drives(ExposureQueryBuilder) 1
experiments:backend/hogql_queries/ posthog.temporal.experiments.test_cache_warming drives(ExperimentQueryRunner) 2
experiments:backend/hogql_queries/ posthog.temporal.experiments.test_cache_warming drives(ExperimentQueryRunnerBaseTest) 1
-experiments:backend/hogql_queries/ products.actions.backend.api.test.test_action drives(ExperimentTrendsQuery) 3
exports.ExportedAsset posthog.ObjectMediaPreview.exported_asset reverse-accessor(object_previews) 1
exports.ExportedAsset products.exports.backend.facade.api.create_export_asset_async facade-returns 1
exports.ExportedAsset products.exports.backend.facade.api.get_export_asset facade-returns 1
diff --git a/products/product_analytics/frontend/generated/api.schemas.ts b/products/product_analytics/frontend/generated/api.schemas.ts
index 4f2a5375de6d..3d01b32293a9 100644
--- a/products/product_analytics/frontend/generated/api.schemas.ts
+++ b/products/product_analytics/frontend/generated/api.schemas.ts
@@ -4542,73 +4542,6 @@ export interface Response15Api {
warnings?: (DataWarehouseSyncWarningApi | AccessControlFilterWarningApi)[] | null
}
-export type ExperimentSignificanceCodeApi =
- (typeof ExperimentSignificanceCodeApi)[keyof typeof ExperimentSignificanceCodeApi]
-
-export const ExperimentSignificanceCodeApi = {
- Significant: 'significant',
- NotEnoughExposure: 'not_enough_exposure',
- LowWinProbability: 'low_win_probability',
- HighLoss: 'high_loss',
- HighPValue: 'high_p_value',
-} as const
-
-export interface ExperimentVariantFunnelsBaseStatsApi {
- failure_count: number
- key: string
- success_count: number
-}
-
-export type Response16ApiCredibleIntervals = { [key: string]: number[] }
-
-export type Response16ApiInsightItemItem = { [key: string]: unknown }
-
-export type Response16ApiProbability = { [key: string]: number }
-
-export interface Response16Api {
- credible_intervals: Response16ApiCredibleIntervals
- expected_loss: number
- funnels_query?: FunnelsQueryApi | null
- insight: Response16ApiInsightItemItem[][]
- kind?: 'ExperimentFunnelsQuery'
- probability: Response16ApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantFunnelsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
-export interface ExperimentVariantTrendsBaseStatsApi {
- absolute_exposure: number
- count: number
- exposure: number
- key: string
-}
-
-export type Response17ApiCredibleIntervals = { [key: string]: number[] }
-
-export type Response17ApiInsightItem = { [key: string]: unknown }
-
-export type Response17ApiProbability = { [key: string]: number }
-
-export interface Response17Api {
- count_query?: TrendsQueryApi | null
- credible_intervals: Response17ApiCredibleIntervals
- exposure_query?: TrendsQueryApi | null
- insight: Response17ApiInsightItem[]
- kind?: 'ExperimentTrendsQuery'
- p_value: number
- probability: Response17ApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantTrendsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
export type AIEventTypeApi = (typeof AIEventTypeApi)[keyof typeof AIEventTypeApi]
export const AIEventTypeApi = {
@@ -4689,7 +4622,7 @@ export interface LLMTraceApi {
webSearchCost?: number | null
}
-export interface Response18Api {
+export interface Response16Api {
columns?: string[] | null
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
@@ -4715,7 +4648,7 @@ export interface Response18Api {
warnings?: (DataWarehouseSyncWarningApi | AccessControlFilterWarningApi)[] | null
}
-export interface Response20Api {
+export interface Response18Api {
columns?: unknown[] | null
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
@@ -4742,7 +4675,7 @@ export interface Response20Api {
warnings?: (DataWarehouseSyncWarningApi | AccessControlFilterWarningApi)[] | null
}
-export interface Response21Api {
+export interface Response19Api {
columns: unknown[]
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
@@ -4817,7 +4750,7 @@ export interface AccountsTableRowApi {
tags?: string[] | null
}
-export interface Response22Api {
+export interface Response20Api {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null
hasMore: boolean
@@ -5735,6 +5668,30 @@ export interface ExperimentBreakdownResultApi {
variants: ExperimentVariantResultFrequentistApi[] | ExperimentVariantResultBayesianApi[]
}
+export type ExperimentSignificanceCodeApi =
+ (typeof ExperimentSignificanceCodeApi)[keyof typeof ExperimentSignificanceCodeApi]
+
+export const ExperimentSignificanceCodeApi = {
+ Significant: 'significant',
+ NotEnoughExposure: 'not_enough_exposure',
+ LowWinProbability: 'low_win_probability',
+ HighLoss: 'high_loss',
+ HighPValue: 'high_p_value',
+} as const
+
+export interface ExperimentVariantTrendsBaseStatsApi {
+ absolute_exposure: number
+ count: number
+ exposure: number
+ key: string
+}
+
+export interface ExperimentVariantFunnelsBaseStatsApi {
+ failure_count: number
+ key: string
+ success_count: number
+}
+
export type ExperimentQueryResponseApiCredibleIntervals = { [key: string]: number[] } | null
export type ExperimentQueryResponseApiInsight = { [key: string]: unknown }[] | null
@@ -7231,80 +7188,6 @@ export interface ErrorTrackingIssueCorrelationQueryApi {
version?: number | null
}
-export type ExperimentFunnelsQueryResponseApiCredibleIntervals = { [key: string]: number[] }
-
-export type ExperimentFunnelsQueryResponseApiInsightItemItem = { [key: string]: unknown }
-
-export type ExperimentFunnelsQueryResponseApiProbability = { [key: string]: number }
-
-export interface ExperimentFunnelsQueryResponseApi {
- credible_intervals: ExperimentFunnelsQueryResponseApiCredibleIntervals
- expected_loss: number
- funnels_query?: FunnelsQueryApi | null
- insight: ExperimentFunnelsQueryResponseApiInsightItemItem[][]
- kind?: 'ExperimentFunnelsQuery'
- probability: ExperimentFunnelsQueryResponseApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantFunnelsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
-export interface ExperimentFunnelsQueryApi {
- experiment_id?: number | null
- fingerprint?: string | null
- funnels_query: FunnelsQueryApi
- kind?: 'ExperimentFunnelsQuery'
- /** Modifiers used when performing the query */
- modifiers?: HogQLQueryModifiersApi | null
- name?: string | null
- response?: ExperimentFunnelsQueryResponseApi | null
- tags?: QueryLogTagsApi | null
- uuid?: string | null
- /** version of the node, used for schema migrations */
- version?: number | null
-}
-
-export type ExperimentTrendsQueryResponseApiCredibleIntervals = { [key: string]: number[] }
-
-export type ExperimentTrendsQueryResponseApiInsightItem = { [key: string]: unknown }
-
-export type ExperimentTrendsQueryResponseApiProbability = { [key: string]: number }
-
-export interface ExperimentTrendsQueryResponseApi {
- count_query?: TrendsQueryApi | null
- credible_intervals: ExperimentTrendsQueryResponseApiCredibleIntervals
- exposure_query?: TrendsQueryApi | null
- insight: ExperimentTrendsQueryResponseApiInsightItem[]
- kind?: 'ExperimentTrendsQuery'
- p_value: number
- probability: ExperimentTrendsQueryResponseApiProbability
- significance_code: ExperimentSignificanceCodeApi
- significant: boolean
- stats_version?: number | null
- variants: ExperimentVariantTrendsBaseStatsApi[]
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarningApi[] | null
-}
-
-export interface ExperimentTrendsQueryApi {
- count_query: TrendsQueryApi
- experiment_id?: number | null
- exposure_query?: TrendsQueryApi | null
- fingerprint?: string | null
- kind?: 'ExperimentTrendsQuery'
- /** Modifiers used when performing the query */
- modifiers?: HogQLQueryModifiersApi | null
- name?: string | null
- response?: ExperimentTrendsQueryResponseApi | null
- tags?: QueryLogTagsApi | null
- uuid?: string | null
- /** version of the node, used for schema migrations */
- version?: number | null
-}
-
export interface TracesQueryResponseApi {
columns?: string[] | null
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -7955,11 +7838,9 @@ export type DataTableNodeApiResponse =
| Response14Api
| Response15Api
| Response16Api
- | Response17Api
| Response18Api
+ | Response19Api
| Response20Api
- | Response21Api
- | Response22Api
| null
export interface DataTableNodeApi {
@@ -8054,8 +7935,6 @@ export interface DataTableNodeApi {
| MarketingAnalyticsAggregatedQueryApi
| ErrorTrackingQueryApi
| ErrorTrackingIssueCorrelationQueryApi
- | ExperimentFunnelsQueryApi
- | ExperimentTrendsQueryApi
| TracesQueryApi
| TraceQueryApi
| SessionQueryApi
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index c035e0b12a9c..6ec0ad6cf0e6 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -5414,7 +5414,7 @@
}
},
"experiment-migrate": {
- "description": "Requires an experiment ID. If you don't have the ID, load the finding-experiments skill to resolve the user's reference first. Only for experiments where is_legacy is true.\n\nMove a legacy experiment onto the new experiments engine. This creates a NEW experiment with the same configuration and its metrics converted to the new format, and returns it. The legacy experiment is left untouched and keeps its results, so the project ends up with two experiments. Both point at the same feature flag, so no new rollout is needed and users keep the variant they already have. Tell the user about the second experiment before you call this.\n\nLegacy shared metrics used by the experiment are converted too. Each one gets a new shared metric, and the new experiment links to that. The legacy shared metrics stay where they are.\n\nCalling this again returns the experiment created the first time instead of making another copy.\n\nReturns 400 if the experiment already uses the new engine.\n\nNo request body needed.",
+ "description": "Requires an experiment ID. If you don't have the ID, load the finding-experiments skill to resolve the user's reference first. Only for experiments where is_legacy is true.\n\nMove a legacy experiment onto the new experiments engine. This creates a NEW experiment with the same configuration and its metrics converted to the new format, and returns it. Legacy experiments no longer show results, so this is how a user gets results for one. The legacy experiment is left untouched, so the project ends up with two experiments. Both point at the same feature flag, so no new rollout is needed and users keep the variant they already have. Tell the user about the second experiment before you call this.\n\nLegacy shared metrics used by the experiment are converted too. Each one gets a new shared metric, and the new experiment links to that. The legacy shared metrics stay where they are.\n\nCalling this again returns the experiment created the first time instead of making another copy.\n\nReturns 400 if the experiment already uses the new engine.\n\nNo request body needed.",
"category": "Experiments",
"feature": "experiments",
"summary": "Migrate legacy experiment",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index ced086a2b5f8..5c411bb85c13 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -5499,7 +5499,7 @@
}
},
"experiment-migrate": {
- "description": "Requires an experiment ID. If you don't have the ID, load the finding-experiments skill to resolve the user's reference first. Only for experiments where is_legacy is true.\n\nMove a legacy experiment onto the new experiments engine. This creates a NEW experiment with the same configuration and its metrics converted to the new format, and returns it. The legacy experiment is left untouched and keeps its results, so the project ends up with two experiments. Both point at the same feature flag, so no new rollout is needed and users keep the variant they already have. Tell the user about the second experiment before you call this.\n\nLegacy shared metrics used by the experiment are converted too. Each one gets a new shared metric, and the new experiment links to that. The legacy shared metrics stay where they are.\n\nCalling this again returns the experiment created the first time instead of making another copy.\n\nReturns 400 if the experiment already uses the new engine.\n\nNo request body needed.",
+ "description": "Requires an experiment ID. If you don't have the ID, load the finding-experiments skill to resolve the user's reference first. Only for experiments where is_legacy is true.\n\nMove a legacy experiment onto the new experiments engine. This creates a NEW experiment with the same configuration and its metrics converted to the new format, and returns it. Legacy experiments no longer show results, so this is how a user gets results for one. The legacy experiment is left untouched, so the project ends up with two experiments. Both point at the same feature flag, so no new rollout is needed and users keep the variant they already have. Tell the user about the second experiment before you call this.\n\nLegacy shared metrics used by the experiment are converted too. Each one gets a new shared metric, and the new experiment links to that. The legacy shared metrics stay where they are.\n\nCalling this again returns the experiment created the first time instead of making another copy.\n\nReturns 400 if the experiment already uses the new engine.\n\nNo request body needed.",
"category": "Experiments",
"feature": "experiments",
"summary": "Migrate legacy experiment",
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 693ee1f7bd48..3daa5e5a701b 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -8878,49 +8878,6 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type Response16CredibleIntervals = {[key: string]: number[]};
-
- export type Response16InsightItemItem = { [key: string]: unknown };
-
- export type Response16Probability = {[key: string]: number};
-
- export interface Response16 {
- credible_intervals: Response16CredibleIntervals;
- expected_loss: number;
- funnels_query?: FunnelsQuery | null;
- insight: Response16InsightItemItem[][];
- kind?: 'ExperimentFunnelsQuery';
- probability: Response16Probability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantFunnelsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export type Response17CredibleIntervals = {[key: string]: number[]};
-
- export type Response17InsightItem = { [key: string]: unknown };
-
- export type Response17Probability = {[key: string]: number};
-
- export interface Response17 {
- count_query?: TrendsQuery | null;
- credible_intervals: Response17CredibleIntervals;
- exposure_query?: TrendsQuery | null;
- insight: Response17InsightItem[];
- kind?: 'ExperimentTrendsQuery';
- p_value: number;
- probability: Response17Probability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantTrendsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
export type LLMSentimentMessageScores = {[key: string]: number} | null;
export interface LLMSentimentMessage {
@@ -8984,7 +8941,7 @@ export namespace Schemas {
webSearchCost?: number | null;
}
- export interface Response18 {
+ export interface Response16 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -9010,7 +8967,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface Response20 {
+ export interface Response18 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -9037,7 +8994,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface Response21 {
+ export interface Response19 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -9067,7 +9024,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface Response22 {
+ export interface Response20 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore: boolean;
@@ -10179,80 +10136,6 @@ export namespace Schemas {
version?: number | null;
}
- export type ExperimentFunnelsQueryResponseCredibleIntervals = {[key: string]: number[]};
-
- export type ExperimentFunnelsQueryResponseInsightItemItem = { [key: string]: unknown };
-
- export type ExperimentFunnelsQueryResponseProbability = {[key: string]: number};
-
- export interface ExperimentFunnelsQueryResponse {
- credible_intervals: ExperimentFunnelsQueryResponseCredibleIntervals;
- expected_loss: number;
- funnels_query?: FunnelsQuery | null;
- insight: ExperimentFunnelsQueryResponseInsightItemItem[][];
- kind?: 'ExperimentFunnelsQuery';
- probability: ExperimentFunnelsQueryResponseProbability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantFunnelsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export interface ExperimentFunnelsQuery {
- experiment_id?: number | null;
- fingerprint?: string | null;
- funnels_query: FunnelsQuery;
- kind?: 'ExperimentFunnelsQuery';
- /** Modifiers used when performing the query */
- modifiers?: HogQLQueryModifiers | null;
- name?: string | null;
- response?: ExperimentFunnelsQueryResponse | null;
- tags?: QueryLogTags | null;
- uuid?: string | null;
- /** version of the node, used for schema migrations */
- version?: number | null;
- }
-
- export type ExperimentTrendsQueryResponseCredibleIntervals = {[key: string]: number[]};
-
- export type ExperimentTrendsQueryResponseInsightItem = { [key: string]: unknown };
-
- export type ExperimentTrendsQueryResponseProbability = {[key: string]: number};
-
- export interface ExperimentTrendsQueryResponse {
- count_query?: TrendsQuery | null;
- credible_intervals: ExperimentTrendsQueryResponseCredibleIntervals;
- exposure_query?: TrendsQuery | null;
- insight: ExperimentTrendsQueryResponseInsightItem[];
- kind?: 'ExperimentTrendsQuery';
- p_value: number;
- probability: ExperimentTrendsQueryResponseProbability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantTrendsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export interface ExperimentTrendsQuery {
- count_query: TrendsQuery;
- experiment_id?: number | null;
- exposure_query?: TrendsQuery | null;
- fingerprint?: string | null;
- kind?: 'ExperimentTrendsQuery';
- /** Modifiers used when performing the query */
- modifiers?: HogQLQueryModifiers | null;
- name?: string | null;
- response?: ExperimentTrendsQueryResponse | null;
- tags?: QueryLogTags | null;
- uuid?: string | null;
- /** version of the node, used for schema migrations */
- version?: number | null;
- }
-
export interface TracesQueryResponse {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -10473,7 +10356,7 @@ export namespace Schemas {
version?: number | null;
}
- export type DataTableNodeResponse = { [key: string]: unknown } | Response | Response1 | Response2 | Response3 | Response4 | Response5 | Response6 | Response7 | Response8 | Response9 | Response10 | Response11 | Response12 | Response13 | Response14 | Response15 | Response16 | Response17 | Response18 | Response20 | Response21 | Response22 | null;
+ export type DataTableNodeResponse = { [key: string]: unknown } | Response | Response1 | Response2 | Response3 | Response4 | Response5 | Response6 | Response7 | Response8 | Response9 | Response10 | Response11 | Response12 | Response13 | Response14 | Response15 | Response16 | Response18 | Response19 | Response20 | null;
export interface DataTableNode {
/** Can the user click on column headers to sort the table? (default: true) */
@@ -10547,7 +10430,7 @@ export namespace Schemas {
/** Show a detailed query timing breakdown */
showTimings?: boolean | null;
/** Source of the events */
- source: EventsNode | EventsQuery | PersonsNode | ActorsQuery | GroupsQuery | HogQLQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | SessionAttributionExplorerQuery | SessionsQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | ErrorTrackingQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | TracesQuery | TraceQuery | SessionQuery | EndpointsUsageTableQuery | AccountsQuery | AccountsTableQuery;
+ source: EventsNode | EventsQuery | PersonsNode | ActorsQuery | GroupsQuery | HogQLQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | SessionAttributionExplorerQuery | SessionsQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | ErrorTrackingQuery | ErrorTrackingIssueCorrelationQuery | TracesQuery | TraceQuery | SessionQuery | EndpointsUsageTableQuery | AccountsQuery | AccountsTableQuery;
tags?: QueryLogTags | null;
/** version of the node, used for schema migrations */
version?: number | null;
@@ -59405,7 +59288,7 @@ export namespace Schemas {
query: string;
response?: HogQLMetadataResponse | null;
/** Query within which "expr" and "template" are validated. Defaults to "select * from events" */
- sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;
+ sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;
tags?: QueryLogTags | null;
/** Variables to be subsituted into the query */
variables?: HogQLMetadataVariables;
@@ -59431,7 +59314,7 @@ export namespace Schemas {
query: string;
response?: HogQLAutocompleteResponse | null;
/** Query in whose context to validate. */
- sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;
+ sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;
/** Start position of the editor word */
startPosition: number;
tags?: QueryLogTags | null;
@@ -91884,7 +91767,7 @@ export namespace Schemas {
* ```
*
* For more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access). */
- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | DataVisualizationNode | BIVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;
+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | DataVisualizationNode | BIVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;
/** Whether results should be calculated sync or async, and how much to rely on the cache:
* - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
* - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
@@ -92301,69 +92184,26 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative18CredibleIntervals = {[key: string]: number[]};
+ export type QueryResponseAlternative18CredibleIntervals = {[key: string]: number[]} | null;
- export type QueryResponseAlternative18InsightItemItem = { [key: string]: unknown };
+ export type QueryResponseAlternative18Insight = { [key: string]: unknown }[] | null;
- export type QueryResponseAlternative18Probability = {[key: string]: number};
+ export type QueryResponseAlternative18Probability = {[key: string]: number} | null;
export interface QueryResponseAlternative18 {
- credible_intervals: QueryResponseAlternative18CredibleIntervals;
- expected_loss: number;
- funnels_query?: FunnelsQuery | null;
- insight: QueryResponseAlternative18InsightItemItem[][];
- kind?: 'ExperimentFunnelsQuery';
- probability: QueryResponseAlternative18Probability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantFunnelsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export type QueryResponseAlternative19CredibleIntervals = {[key: string]: number[]};
-
- export type QueryResponseAlternative19InsightItem = { [key: string]: unknown };
-
- export type QueryResponseAlternative19Probability = {[key: string]: number};
-
- export interface QueryResponseAlternative19 {
- count_query?: TrendsQuery | null;
- credible_intervals: QueryResponseAlternative19CredibleIntervals;
- exposure_query?: TrendsQuery | null;
- insight: QueryResponseAlternative19InsightItem[];
- kind?: 'ExperimentTrendsQuery';
- p_value: number;
- probability: QueryResponseAlternative19Probability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantTrendsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export type QueryResponseAlternative20CredibleIntervals = {[key: string]: number[]} | null;
-
- export type QueryResponseAlternative20Insight = { [key: string]: unknown }[] | null;
-
- export type QueryResponseAlternative20Probability = {[key: string]: number} | null;
-
- export interface QueryResponseAlternative20 {
baseline?: ExperimentStatsBaseValidated | null;
/** Results grouped by breakdown value. When present, baseline and variant_results contain aggregated data. */
breakdown_results?: ExperimentBreakdownResult[] | null;
clickhouse_sql?: string | null;
- credible_intervals?: QueryResponseAlternative20CredibleIntervals;
+ credible_intervals?: QueryResponseAlternative18CredibleIntervals;
hogql?: string | null;
- insight?: QueryResponseAlternative20Insight;
+ insight?: QueryResponseAlternative18Insight;
/** Whether exposures were served from the precomputation system */
is_precomputed?: boolean | null;
kind?: 'ExperimentQuery';
metric?: ExperimentMeanMetric | ExperimentFunnelMetric | ExperimentRatioMetric | ExperimentRetentionMetric | null;
p_value?: number | null;
- probability?: QueryResponseAlternative20Probability;
+ probability?: QueryResponseAlternative18Probability;
significance_code?: ExperimentSignificanceCode | null;
significant?: boolean | null;
stats_version?: number | null;
@@ -92373,9 +92213,9 @@ export namespace Schemas {
warnings?: DataWarehouseSyncWarning[] | null;
}
- export type QueryResponseAlternative21TotalExposures = {[key: string]: number};
+ export type QueryResponseAlternative19TotalExposures = {[key: string]: number};
- export interface QueryResponseAlternative21 {
+ export interface QueryResponseAlternative19 {
bias_risk?: BiasRisk | null;
date_range: DateRange;
/** Health check diagnostics that read the exposures: zero exposures, a sample ratio mismatch, and bias. Empty when every check passed. */
@@ -92383,12 +92223,12 @@ export namespace Schemas {
kind?: 'ExperimentExposureQuery';
sample_ratio_mismatch?: SampleRatioMismatch | null;
timeseries: ExperimentExposureTimeSeries[];
- total_exposures: QueryResponseAlternative21TotalExposures;
+ total_exposures: QueryResponseAlternative19TotalExposures;
/** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
warnings?: DataWarehouseSyncWarning[] | null;
}
- export interface QueryResponseAlternative22 {
+ export interface QueryResponseAlternative20 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -92413,7 +92253,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative23 {
+ export interface QueryResponseAlternative21 {
dateFrom?: string | null;
dateTo?: string | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -92441,7 +92281,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative24 {
+ export interface QueryResponseAlternative22 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92474,7 +92314,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative25 {
+ export interface QueryResponseAlternative23 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92502,7 +92342,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative26 {
+ export interface QueryResponseAlternative24 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92529,7 +92369,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative28 {
+ export interface QueryResponseAlternative26 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92560,7 +92400,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative29 {
+ export interface QueryResponseAlternative27 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -92589,7 +92429,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative30 {
+ export interface QueryResponseAlternative28 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -92614,15 +92454,15 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative31Data = { [key: string]: unknown };
+ export type QueryResponseAlternative29Data = { [key: string]: unknown };
- export interface QueryResponseAlternative31 {
- data: QueryResponseAlternative31Data;
+ export interface QueryResponseAlternative29 {
+ data: QueryResponseAlternative29Data;
error?: ExternalQueryError | null;
status: ExternalQueryStatus;
}
- export interface QueryResponseAlternative32 {
+ export interface QueryResponseAlternative30 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -92646,7 +92486,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative33 {
+ export interface QueryResponseAlternative31 {
columns?: unknown[] | null;
/** ISO timestamp of the oldest precompute window backing this result — surfaced as "data as of X". */
dataComputedAt?: string | null;
@@ -92678,9 +92518,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative34Results = {[key: string]: MarketingAnalyticsItem};
+ export type QueryResponseAlternative32Results = {[key: string]: MarketingAnalyticsItem};
- export interface QueryResponseAlternative34 {
+ export interface QueryResponseAlternative32 {
/** ISO timestamp of the oldest precompute window backing this result — surfaced as "data as of X". */
dataComputedAt?: string | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -92697,7 +92537,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative34Results;
+ results: QueryResponseAlternative32Results;
samplingRate?: SamplingRate | null;
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
@@ -92707,7 +92547,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative35 {
+ export interface QueryResponseAlternative33 {
/** Whether this result counted a repeat converter's every conversion, after resolving the query's null against the goal's math. The rate columns are a true share only when this is false, so the table reads it to label them. */
allowsMultipleConversionsPerVisitor: boolean;
/** The team's configured attribution window, for the tooltips. */
@@ -92744,7 +92584,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative36 {
+ export interface QueryResponseAlternative34 {
/** Conversions with at least one in-window touchpoint. The share denominator — deliberately unfiltered by min/maxTouchpoints so shares stay comparable across filter values. */
attributedConversions: number;
/** The attribution window actually used, for the tooltips. */
@@ -92777,7 +92617,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative37 {
+ export interface QueryResponseAlternative35 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -92812,7 +92652,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative38 {
+ export interface QueryResponseAlternative36 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -92838,7 +92678,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative39 {
+ export interface QueryResponseAlternative37 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92867,7 +92707,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative40 {
+ export interface QueryResponseAlternative38 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92895,7 +92735,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative41 {
+ export interface QueryResponseAlternative39 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -92923,7 +92763,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative42 {
+ export interface QueryResponseAlternative40 {
/** Executed ClickHouse query */
clickhouse?: string | null;
/** Returned columns */
@@ -92960,7 +92800,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative43 {
+ export interface QueryResponseAlternative41 {
dateFrom?: string | null;
dateTo?: string | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -92988,7 +92828,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative44 {
+ export interface QueryResponseAlternative42 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93021,7 +92861,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative45 {
+ export interface QueryResponseAlternative43 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93049,7 +92889,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative46 {
+ export interface QueryResponseAlternative44 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93076,7 +92916,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative47 {
+ export interface QueryResponseAlternative45 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93107,7 +92947,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative48 {
+ export interface QueryResponseAlternative46 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93136,7 +92976,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative49 {
+ export interface QueryResponseAlternative47 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93163,7 +93003,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative50 {
+ export interface QueryResponseAlternative48 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93190,7 +93030,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative51 {
+ export interface QueryResponseAlternative49 {
columns?: unknown[] | null;
/** ISO timestamp of the oldest precompute window backing this result — surfaced as "data as of X". */
dataComputedAt?: string | null;
@@ -93222,9 +93062,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative52Results = {[key: string]: MarketingAnalyticsItem};
+ export type QueryResponseAlternative50Results = {[key: string]: MarketingAnalyticsItem};
- export interface QueryResponseAlternative52 {
+ export interface QueryResponseAlternative50 {
/** ISO timestamp of the oldest precompute window backing this result — surfaced as "data as of X". */
dataComputedAt?: string | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -93241,7 +93081,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative52Results;
+ results: QueryResponseAlternative50Results;
samplingRate?: SamplingRate | null;
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
@@ -93251,7 +93091,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative53 {
+ export interface QueryResponseAlternative51 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93277,7 +93117,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative54 {
+ export interface QueryResponseAlternative52 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93303,50 +93143,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative55CredibleIntervals = {[key: string]: number[]};
-
- export type QueryResponseAlternative55InsightItemItem = { [key: string]: unknown };
-
- export type QueryResponseAlternative55Probability = {[key: string]: number};
-
- export interface QueryResponseAlternative55 {
- credible_intervals: QueryResponseAlternative55CredibleIntervals;
- expected_loss: number;
- funnels_query?: FunnelsQuery | null;
- insight: QueryResponseAlternative55InsightItemItem[][];
- kind?: 'ExperimentFunnelsQuery';
- probability: QueryResponseAlternative55Probability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantFunnelsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export type QueryResponseAlternative56CredibleIntervals = {[key: string]: number[]};
-
- export type QueryResponseAlternative56InsightItem = { [key: string]: unknown };
-
- export type QueryResponseAlternative56Probability = {[key: string]: number};
-
- export interface QueryResponseAlternative56 {
- count_query?: TrendsQuery | null;
- credible_intervals: QueryResponseAlternative56CredibleIntervals;
- exposure_query?: TrendsQuery | null;
- insight: QueryResponseAlternative56InsightItem[];
- kind?: 'ExperimentTrendsQuery';
- p_value: number;
- probability: QueryResponseAlternative56Probability;
- significance_code: ExperimentSignificanceCode;
- significant: boolean;
- stats_version?: number | null;
- variants: ExperimentVariantTrendsBaseStats[];
- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
- warnings?: DataWarehouseSyncWarning[] | null;
- }
-
- export interface QueryResponseAlternative57 {
+ export interface QueryResponseAlternative53 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93372,7 +93169,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative59 {
+ export interface QueryResponseAlternative55 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93399,7 +93196,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative60 {
+ export interface QueryResponseAlternative56 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93429,7 +93226,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative61 {
+ export interface QueryResponseAlternative57 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore: boolean;
@@ -93457,9 +93254,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative62ResultsItem = { [key: string]: unknown };
+ export type QueryResponseAlternative58ResultsItem = { [key: string]: unknown };
- export interface QueryResponseAlternative62 {
+ export interface QueryResponseAlternative58 {
boxplot_data?: BoxPlotDatum[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93475,7 +93272,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative62ResultsItem[];
+ results: QueryResponseAlternative58ResultsItem[];
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
/** Connector-synced data warehouse sources referenced by this query, if any. */
@@ -93484,7 +93281,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative63 {
+ export interface QueryResponseAlternative59 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93508,7 +93305,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative64 {
+ export interface QueryResponseAlternative60 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93530,7 +93327,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative65 {
+ export interface QueryResponseAlternative61 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93552,7 +93349,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative66 {
+ export interface QueryResponseAlternative62 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93574,9 +93371,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative67ResultsItem = { [key: string]: unknown };
+ export type QueryResponseAlternative63ResultsItem = { [key: string]: unknown };
- export interface QueryResponseAlternative67 {
+ export interface QueryResponseAlternative63 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93589,7 +93386,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative67ResultsItem[];
+ results: QueryResponseAlternative63ResultsItem[];
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
/** Connector-synced data warehouse sources referenced by this query, if any. */
@@ -93598,7 +93395,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative69 {
+ export interface QueryResponseAlternative65 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93625,14 +93422,14 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative70Tables = {[key: string]: DatabaseSchemaPostHogTable | DatabaseSchemaSystemTable | DatabaseSchemaDataWarehouseTable | DatabaseSchemaViewTable | DatabaseSchemaManagedViewTable | DatabaseSchemaBatchExportTable | DatabaseSchemaMaterializedViewTable | DatabaseSchemaEndpointTable};
+ export type QueryResponseAlternative66Tables = {[key: string]: DatabaseSchemaPostHogTable | DatabaseSchemaSystemTable | DatabaseSchemaDataWarehouseTable | DatabaseSchemaViewTable | DatabaseSchemaManagedViewTable | DatabaseSchemaBatchExportTable | DatabaseSchemaMaterializedViewTable | DatabaseSchemaEndpointTable};
- export interface QueryResponseAlternative70 {
+ export interface QueryResponseAlternative66 {
joins: DataWarehouseViewLink[];
- tables: QueryResponseAlternative70Tables;
+ tables: QueryResponseAlternative66Tables;
}
- export interface QueryResponseAlternative71 {
+ export interface QueryResponseAlternative67 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
has_next: boolean;
@@ -93657,7 +93454,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative72 {
+ export interface QueryResponseAlternative68 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93685,7 +93482,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative73 {
+ export interface QueryResponseAlternative69 {
count: number;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93708,7 +93505,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative74 {
+ export interface QueryResponseAlternative70 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93730,7 +93527,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative75 {
+ export interface QueryResponseAlternative71 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93752,7 +93549,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative76 {
+ export interface QueryResponseAlternative72 {
/** Upper bound per row (y axis), ascending. */
bounds: number[];
/** Observation count per cell: counts[row][column], row = bound, column = time. */
@@ -93780,7 +93577,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative77 {
+ export interface QueryResponseAlternative73 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -93807,7 +93604,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative78 {
+ export interface QueryResponseAlternative74 {
/** Result rows for the comparison period when `compareFilter.compare` is true. */
compare?: AggregatedSpanRow[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -93831,7 +93628,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative79 {
+ export interface QueryResponseAlternative75 {
/** Result rows for the comparison period when `compareFilter.compare` is true. */
compare?: SpanTreeNode[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -93855,7 +93652,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative80 {
+ export interface QueryResponseAlternative76 {
/** Result rows for the comparison period when `compareFilter.compare` is true. */
compare?: AttributeBreakdownRow[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -93879,13 +93676,13 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative81 {
+ export interface QueryResponseAlternative77 {
questions: string[];
/** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
warnings?: DataWarehouseSyncWarning[] | null;
}
- export interface QueryResponseAlternative82 {
+ export interface QueryResponseAlternative78 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -93910,7 +93707,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative83 {
+ export interface QueryResponseAlternative79 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -93935,7 +93732,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative84 {
+ export interface QueryResponseAlternative80 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -93957,7 +93754,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative85 {
+ export interface QueryResponseAlternative81 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -93983,7 +93780,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative88 {
+ export interface QueryResponseAlternative84 {
/** Timestamp of the newer trace */
newerTimestamp?: string | null;
/** ID of the newer trace (chronologically after current) */
@@ -93998,7 +93795,7 @@ export namespace Schemas {
warnings?: DataWarehouseSyncWarning[] | null;
}
- export interface QueryResponseAlternative89 {
+ export interface QueryResponseAlternative85 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94020,7 +93817,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative90 {
+ export interface QueryResponseAlternative86 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94042,7 +93839,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative91 {
+ export interface QueryResponseAlternative87 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -94072,7 +93869,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative92 {
+ export interface QueryResponseAlternative88 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore: boolean;
@@ -94100,7 +93897,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative93 {
+ export interface QueryResponseAlternative89 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94122,7 +93919,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative94 {
+ export interface QueryResponseAlternative90 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -94149,9 +93946,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative95ResultsItem = { [key: string]: unknown };
+ export type QueryResponseAlternative91ResultsItem = { [key: string]: unknown };
- export interface QueryResponseAlternative95 {
+ export interface QueryResponseAlternative91 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94164,7 +93961,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative95ResultsItem[];
+ results: QueryResponseAlternative91ResultsItem[];
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
/** Connector-synced data warehouse sources referenced by this query, if any. */
@@ -94173,7 +93970,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative96 {
+ export interface QueryResponseAlternative92 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94195,7 +93992,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative97 {
+ export interface QueryResponseAlternative93 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94217,7 +94014,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative98 {
+ export interface QueryResponseAlternative94 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94239,7 +94036,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative99 {
+ export interface QueryResponseAlternative95 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Whether another page of individual model identifiers is available. */
@@ -94263,7 +94060,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative100 {
+ export interface QueryResponseAlternative96 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94285,7 +94082,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative101 {
+ export interface QueryResponseAlternative97 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94307,7 +94104,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative102 {
+ export interface QueryResponseAlternative98 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94329,7 +94126,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative103 {
+ export interface QueryResponseAlternative99 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94351,7 +94148,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative104 {
+ export interface QueryResponseAlternative100 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94374,7 +94171,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative105 {
+ export interface QueryResponseAlternative101 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94396,7 +94193,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative106 {
+ export interface QueryResponseAlternative102 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94424,7 +94221,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative107 {
+ export interface QueryResponseAlternative103 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94446,7 +94243,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative108 {
+ export interface QueryResponseAlternative104 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94468,7 +94265,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative109 {
+ export interface QueryResponseAlternative105 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94490,7 +94287,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative110 {
+ export interface QueryResponseAlternative106 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94512,7 +94309,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative111 {
+ export interface QueryResponseAlternative107 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94534,7 +94331,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative112 {
+ export interface QueryResponseAlternative108 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94556,7 +94353,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative113 {
+ export interface QueryResponseAlternative109 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94578,7 +94375,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative114 {
+ export interface QueryResponseAlternative110 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Whether more reports exist past this page. */
@@ -94602,7 +94399,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative115 {
+ export interface QueryResponseAlternative111 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -94624,7 +94421,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative = { [key: string]: unknown } | QueryResponseAlternative1 | QueryResponseAlternative2 | QueryResponseAlternative3 | QueryResponseAlternative4 | QueryResponseAlternative5 | QueryResponseAlternative6 | QueryResponseAlternative7 | QueryResponseAlternative8 | QueryResponseAlternative9 | QueryResponseAlternative10 | QueryResponseAlternative11 | QueryResponseAlternative12 | QueryResponseAlternative13 | QueryResponseAlternative14 | QueryResponseAlternative15 | QueryResponseAlternative16 | QueryResponseAlternative17 | QueryResponseAlternative18 | QueryResponseAlternative19 | QueryResponseAlternative20 | QueryResponseAlternative21 | QueryResponseAlternative22 | QueryResponseAlternative23 | QueryResponseAlternative24 | QueryResponseAlternative25 | QueryResponseAlternative26 | QueryResponseAlternative28 | QueryResponseAlternative29 | QueryResponseAlternative30 | QueryResponseAlternative31 | QueryResponseAlternative32 | QueryResponseAlternative33 | QueryResponseAlternative34 | QueryResponseAlternative35 | QueryResponseAlternative36 | QueryResponseAlternative37 | QueryResponseAlternative38 | unknown | QueryResponseAlternative39 | QueryResponseAlternative40 | QueryResponseAlternative41 | QueryResponseAlternative42 | QueryResponseAlternative43 | QueryResponseAlternative44 | QueryResponseAlternative45 | QueryResponseAlternative46 | QueryResponseAlternative47 | QueryResponseAlternative48 | QueryResponseAlternative49 | QueryResponseAlternative50 | QueryResponseAlternative51 | QueryResponseAlternative52 | QueryResponseAlternative53 | QueryResponseAlternative54 | QueryResponseAlternative55 | QueryResponseAlternative56 | QueryResponseAlternative57 | QueryResponseAlternative59 | QueryResponseAlternative60 | QueryResponseAlternative61 | QueryResponseAlternative62 | QueryResponseAlternative63 | QueryResponseAlternative64 | QueryResponseAlternative65 | QueryResponseAlternative66 | QueryResponseAlternative67 | QueryResponseAlternative69 | QueryResponseAlternative70 | QueryResponseAlternative71 | QueryResponseAlternative72 | QueryResponseAlternative73 | QueryResponseAlternative74 | QueryResponseAlternative75 | QueryResponseAlternative76 | QueryResponseAlternative77 | QueryResponseAlternative78 | QueryResponseAlternative79 | QueryResponseAlternative80 | QueryResponseAlternative81 | QueryResponseAlternative82 | QueryResponseAlternative83 | QueryResponseAlternative84 | QueryResponseAlternative85 | QueryResponseAlternative88 | QueryResponseAlternative89 | QueryResponseAlternative90 | QueryResponseAlternative91 | QueryResponseAlternative92 | QueryResponseAlternative93 | QueryResponseAlternative94 | QueryResponseAlternative95 | QueryResponseAlternative96 | QueryResponseAlternative97 | QueryResponseAlternative98 | QueryResponseAlternative99 | QueryResponseAlternative100 | QueryResponseAlternative101 | QueryResponseAlternative102 | QueryResponseAlternative103 | QueryResponseAlternative104 | QueryResponseAlternative105 | QueryResponseAlternative106 | QueryResponseAlternative107 | QueryResponseAlternative108 | QueryResponseAlternative109 | QueryResponseAlternative110 | QueryResponseAlternative111 | QueryResponseAlternative112 | QueryResponseAlternative113 | QueryResponseAlternative114 | QueryResponseAlternative115;
+ export type QueryResponseAlternative = { [key: string]: unknown } | QueryResponseAlternative1 | QueryResponseAlternative2 | QueryResponseAlternative3 | QueryResponseAlternative4 | QueryResponseAlternative5 | QueryResponseAlternative6 | QueryResponseAlternative7 | QueryResponseAlternative8 | QueryResponseAlternative9 | QueryResponseAlternative10 | QueryResponseAlternative11 | QueryResponseAlternative12 | QueryResponseAlternative13 | QueryResponseAlternative14 | QueryResponseAlternative15 | QueryResponseAlternative16 | QueryResponseAlternative17 | QueryResponseAlternative18 | QueryResponseAlternative19 | QueryResponseAlternative20 | QueryResponseAlternative21 | QueryResponseAlternative22 | QueryResponseAlternative23 | QueryResponseAlternative24 | QueryResponseAlternative26 | QueryResponseAlternative27 | QueryResponseAlternative28 | QueryResponseAlternative29 | QueryResponseAlternative30 | QueryResponseAlternative31 | QueryResponseAlternative32 | QueryResponseAlternative33 | QueryResponseAlternative34 | QueryResponseAlternative35 | QueryResponseAlternative36 | unknown | QueryResponseAlternative37 | QueryResponseAlternative38 | QueryResponseAlternative39 | QueryResponseAlternative40 | QueryResponseAlternative41 | QueryResponseAlternative42 | QueryResponseAlternative43 | QueryResponseAlternative44 | QueryResponseAlternative45 | QueryResponseAlternative46 | QueryResponseAlternative47 | QueryResponseAlternative48 | QueryResponseAlternative49 | QueryResponseAlternative50 | QueryResponseAlternative51 | QueryResponseAlternative52 | QueryResponseAlternative53 | QueryResponseAlternative55 | QueryResponseAlternative56 | QueryResponseAlternative57 | QueryResponseAlternative58 | QueryResponseAlternative59 | QueryResponseAlternative60 | QueryResponseAlternative61 | QueryResponseAlternative62 | QueryResponseAlternative63 | QueryResponseAlternative65 | QueryResponseAlternative66 | QueryResponseAlternative67 | QueryResponseAlternative68 | QueryResponseAlternative69 | QueryResponseAlternative70 | QueryResponseAlternative71 | QueryResponseAlternative72 | QueryResponseAlternative73 | QueryResponseAlternative74 | QueryResponseAlternative75 | QueryResponseAlternative76 | QueryResponseAlternative77 | QueryResponseAlternative78 | QueryResponseAlternative79 | QueryResponseAlternative80 | QueryResponseAlternative81 | QueryResponseAlternative84 | QueryResponseAlternative85 | QueryResponseAlternative86 | QueryResponseAlternative87 | QueryResponseAlternative88 | QueryResponseAlternative89 | QueryResponseAlternative90 | QueryResponseAlternative91 | QueryResponseAlternative92 | QueryResponseAlternative93 | QueryResponseAlternative94 | QueryResponseAlternative95 | QueryResponseAlternative96 | QueryResponseAlternative97 | QueryResponseAlternative98 | QueryResponseAlternative99 | QueryResponseAlternative100 | QueryResponseAlternative101 | QueryResponseAlternative102 | QueryResponseAlternative103 | QueryResponseAlternative104 | QueryResponseAlternative105 | QueryResponseAlternative106 | QueryResponseAlternative107 | QueryResponseAlternative108 | QueryResponseAlternative109 | QueryResponseAlternative110 | QueryResponseAlternative111;
export interface QueryScanResponse {
analysis?: QueryScanAnalysis | null;
@@ -94635,11 +94432,11 @@ export namespace Schemas {
}
export interface QueryUpgradeRequest {
- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | DataVisualizationNode | BIVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;
+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | DataVisualizationNode | BIVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;
}
export interface QueryUpgradeResponse {
- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | DataVisualizationNode | BIVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;
+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | MarketingAnalyticsSearchQuery | DataVisualizationNode | BIVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;
}
export interface QuotaResourceLimit {
diff --git a/services/mcp/src/generated/experiments/api.ts b/services/mcp/src/generated/experiments/api.ts
index 8baa9bd4b99d..4a873800041c 100644
--- a/services/mcp/src/generated/experiments/api.ts
+++ b/services/mcp/src/generated/experiments/api.ts
@@ -19354,10 +19354,10 @@ export const ExperimentsMetricsRecalculationLatestRetrieveParams = () => zod.obj
* Move a legacy experiment onto the new experiments engine.
*
* Creates a new experiment with the same configuration and its metrics converted
- * to the new format, and returns it. The legacy experiment is left untouched and
- * keeps its results, so the project ends up with two experiments. Both point at
- * the same feature flag, so no new rollout is needed and users keep the variant
- * they already have.
+ * to the new format, and returns it. Legacy experiments no longer show results,
+ * so this is how to get results for one. The legacy experiment is left untouched,
+ * so the project ends up with two experiments. Both point at the same feature
+ * flag, so no new rollout is needed and users keep the variant they already have.
*
* Legacy shared metrics used by the experiment are converted as part of the same
* call. Each one gets a new shared metric, and the new experiment links to that.