Skip to content

TypeResampleBuilder🔗

Constructor🔗

new TypeResampleBuilder()

Methods🔗

build🔗

Builds the object.

build()

datasource🔗

The datasource

datasource(\Grafana\Foundation\Dashboard\DataSourceRef $datasource)

downsampler🔗

The downsample function

Possible enum values:

  • "sum"

  • "mean"

  • "min"

  • "max"

  • "count"

  • "last"

  • "median"

downsampler(\Grafana\Foundation\Expr\TypeResampleDownsampler $downsampler)

expression🔗

The math expression

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)

hide(bool $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

intervalMs(float $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

maxDataPoints(int $maxDataPoints)

queryType🔗

QueryType is an optional identifier for the type of query.

It can be used to distinguish different types of queries.

queryType(string $queryType)

refId🔗

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

refId(string $refId)

resultAssertions🔗

Optionally define expected query result behavior

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Expr\ExprTypeResampleResultAssertions> $resultAssertions

resultAssertions(\Grafana\Foundation\Cog\Builder $resultAssertions)

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

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Expr\ExprTypeResampleTimeRange> $timeRange

timeRange(\Grafana\Foundation\Cog\Builder $timeRange)

upsampler🔗

The upsample function

Possible enum values:

  • "pad" Use the last seen value

  • "backfilling" backfill

  • "fillna" Do not fill values (nill)

upsampler(\Grafana\Foundation\Expr\TypeResampleUpsampler $upsampler)

window🔗

The time duration

window(string $window)

See also🔗