Ad-hoc analytics queries tools

execute_analytics_eql

Runs an ad-hoc analytics query written in EQL (Exponea Query Language) against a project. Nothing is saved in the project — the result is computed and returned.

The query must be a select report query or a funnel query. Examples:

  • select count customers by customer.country
  • select sum event purchase.revenue
  • funnel session_start followed by purchase

Standalone metric expressions (such as count event purchase) are not executable on their own. Wrap them in a select, like select count event purchase.

EQL parse errors are returned as success: false with the parser's message in the error field — they are not raised as exceptions.

Request parameters

NameTypeRequired?Description
project_idstrYesThe project ID returned by list_projects.
querystrYesThe EQL query string. Must be a select report query or a funnel query.
execution_timeint | nullNoA Unix timestamp (in seconds) used as the upper boundary for events to consider. Defaults to the current time.

Response parameters

The tool returns an EqlExecutionResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the query was parsed and computed successfully.
querystrThe EQL query string that was executed.
analysis_typestr | nullThe analysis type inferred from the EQL query: report, trend, or funnel. Null if parsing failed before the type could be determined.
dataany | nullThe computed result. The shape depends on analysis_type. For reports: rows with headers and metric values. For funnels: step-by-step conversion counts and rates.
errorstr | nullError message if parsing or computation failed.


© Bloomreach, Inc. All rights reserved.