Skip to content

Engine Queries

engine.queries represents a log entry for a query executed by a team, capturing both semantic details and execution-level statistics. It is designed to help teams analyze their query behavior, identify inefficiencies, and validate performance issues.

By including rich metadata such as the query structure, data sources, semantic features, execution duration, failure diagnostics, and resource usage, this log enables users to:

  • Investigate why a query was slow or failed.
  • Verify claims about performance bottlenecks.
  • Understand query patterns and usage trends.
  • Provide evidence-based feedback before raising support questions.

This schema is particularly useful for building dashboards, audit trails, or developer-facing tools that surface historical query performance and reliability.

clientInfo
userEmail

type: string
The email address of the user who issued the query.

originatingTeamId

type: number
The internal team ID that owns or initiated the query.

queryInfo
semanticLabels
containsFreeTextSearch

type: boolean
Whether the query includes full-text search elements.

containsUnions

type: boolean
Whether the query includes SQL-style UNION clauses.

containsAggregations

type: boolean
Whether the query uses aggregation functions like SUM, COUNT, AVG.

nonDefaultLimitRequested

type: boolean
Indicates if the query requests a result size different from the default.

containsWildTextSearch

type: boolean
Whether the query includes wildcard search terms (e.g., *, %).

containsGroupingSets

type: boolean
Whether grouping sets or similar constructs are used in the query.

containsJoins

type: boolean
Whether the query involves joining multiple datasets or tables.

containsExtract

type: boolean
Whether the query includes extract operations (e.g., parsing time or string fields).

extractBeforeFilter

type: boolean
Whether the extract operation occurs before filtering in execution order.

querySyntax

type: string
The syntax format used in the query (e.g., SQL, Lucene).

sources

type: array
A list of source datasets and their configurations used in the query.

items
fqDataset

type: string
The fully qualified name of the dataset.

teamId

type: string
The team responsible for the dataset (optional).

timeFrame
start

type: string
Start timestamp of the source's time range.

end

type: string
End timestamp of the source's time range.

durationMs

type: number
Total duration of the selected timeframe in milliseconds.

scopeExpression

type: string
Expression that filters or scopes the source data (e.g., labels or conditions).

queryOutcome
errorMessage

type: string
Optional error message if the query failed.

outputRowCount

type: number
Number of rows returned by the query.

status

Enum: Completed, Failed, Cancelled, Incomplete
The final status of the query execution.

storage
aggBucketsLimitReached

type: boolean
Indicates whether the aggregation bucket limit was hit.

bytesShuffled

type: number
Amount of data shuffled during execution, in bytes.

scrollTimeoutReached

type: boolean
True if the scroll operation timed out before completing.

blocksLimitReached

type: boolean
True if the query hit a limit on internal data blocks processed.

filesReadLimitReached

type: boolean
True if a hard limit on the number of files read was reached.

scanLimitReached

type: boolean
True if the data scan exceeded the configured threshold.

columnLimitReached

type: boolean
Indicates whether the column limit was hit during execution.

shuffleSizeLimitReached

type: boolean
Indicates if the shuffle size limit was exceeded.

bytesScanned

type: number
Total number of bytes scanned by the query engine.

failureType

Enum: bad request, rate limit reached, business timeout, not found, permission denied, internal, resource exhausted, internal death, query failed, query timed out
The reason the query failed, if applicable.

failureClass

Enum: clientError, serverError
Classification of the error as client-side or server-side.

e2eDurationMs

type: number
Total execution time from request to response in milliseconds.

queryId

type: string
A unique identifier for the query execution.

queryBlueprints
queryTextSearchFilters

type: string
A representation of the query's text-based filters.

queryNoLiterals

type: string
The query string with literals removed for comparison/normalization.

queryLabelFilters

type: string
A normalized form of the label-based filters in the query.

defaultTimeFrame
start

type: string
Default time range start if none is specified.

end

type: string
Default time range end if none is specified.

durationMs

type: number
Total default time range duration in milliseconds.

queryText

type: string
The original raw query as issued by the user.

queryEngine

type: string
The backend engine that executed the query (e.g., DPL, SQL).