Skip to content

TypeReduceBuilder🔗

Constructor🔗

new TypeReduceBuilder()

Methods🔗

build🔗

Builds the object.

public TypeReduce build()

datasource🔗

The datasource

public TypeReduceBuilder datasource(DataSourceRef datasource)

expression🔗

Reference to single query result

public TypeReduceBuilder expression(String expression)

hide🔗

true if query is disabled (ie should not be returned to the dashboard)

NOTE: this does not always imply that the query should not be executed since

the results from a hidden query may be used as the input to other queries (SSE etc)

public TypeReduceBuilder hide(Boolean hide)

intervalMs🔗

Interval is the suggested duration between time points in a time series query.

NOTE: the values for intervalMs is not saved in the query model. It is typically calculated

from the interval required to fill a pixels in the visualization

public TypeReduceBuilder intervalMs(Double intervalMs)

maxDataPoints🔗

MaxDataPoints is the maximum number of data points that should be returned from a time series query.

NOTE: the values for maxDataPoints is not saved in the query model. It is typically calculated

from the number of pixels visible in a visualization

public TypeReduceBuilder maxDataPoints(Long maxDataPoints)

queryType🔗

QueryType is an optional identifier for the type of query.

It can be used to distinguish different types of queries.

public TypeReduceBuilder queryType(String queryType)

reducer🔗

The reducer

Possible enum values:

  • "sum"

  • "mean"

  • "min"

  • "max"

  • "count"

  • "last"

  • "median"

public TypeReduceBuilder reducer(TypeReduceReducer reducer)

refId🔗

RefID is the unique identifier of the query, set by the frontend call.

public TypeReduceBuilder refId(String refId)

resultAssertions🔗

Optionally define expected query result behavior

public TypeReduceBuilder resultAssertions(com.grafana.foundation.cog.Builder<ExprTypeReduceResultAssertions> resultAssertions)

settings🔗

Reducer Options

public TypeReduceBuilder settings(com.grafana.foundation.cog.Builder<ExprTypeReduceSettings> settings)

timeRange🔗

TimeRange represents the query range

NOTE: unlike generic /ds/query, we can now send explicit time values in each query

NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly

public TypeReduceBuilder timeRange(com.grafana.foundation.cog.Builder<ExprTypeReduceTimeRange> timeRange)

See also🔗