Resample target points (optional, in the Reduce section of the edit form) is the last pipeline step, running after Reduce — it reduces the number of points by grouping them into a fixed number of equal-length time windows spanning the evaluated period, and aggregating every point that falls in each window into one point.

What it resamples depends on Reduce’s scope:

Reduce scope What resample runs on
(none configured) The DPS’s raw filtered series, one series at a time.
One Nothing — One already collapsed to a single value; resample has no effect.
One per series Nothing — each series already collapsed to a single value; resample has no effect.
One serie The merged series Reduce produced (one point per timestamp across series).

So resample is only ever meaningful when the DPS returns a time series — either because no reduce is configured, or because One serie was chosen. Configuring Resample target points alongside One/One per series is harmless but does nothing.

Each bucket is aggregated using the same Metric type chosen for the DPS (not the reduce function) — a bucket doesn’t pick one representative point, it combines every point inside it. The resulting point is timestamped with the start of its window, not with any of the raw points that went into it.

Example — 5 raw points over a one-minute period, resampled into 3 target points:

Interval 1 (10:00:00) Interval 2 (10:00:15) Interval 3 (10:00:30) Interval 4 (10:00:45) Interval 5 (10:01:00)
Value 1 2 3 4 5

The period lasts 60 seconds and 3 points are asked for, so each window covers 20 seconds. That splits the five points unevenly:

Bucket 1
(10:00:00 → 10:00:20)
Bucket 2
(10:00:20 → 10:00:40)
Bucket 3
(10:00:40 → 10:01:00)
Result
Values in the window 1, 2 3 4, 5
AVG 1.5 3 4.5 (10:00:00, 1.5)
(10:00:20, 3)
(10:00:40, 4.5)
MAX 2 3 5 (10:00:00, 2)
(10:00:20, 3)
(10:00:40, 5)
MIN 1 3 4 (10:00:00, 1)
(10:00:20, 3)
(10:00:40, 4)
COUNT 3 3 9 (10:00:00, 3)
(10:00:20, 3)
(10:00:40, 9)

Windows are time-based, not count-based. Which raw points share a bucket depends on their timestamps, not on “every N points”. Above, evenly-spaced points still land 2 / 1 / 2 across the windows, because 15-second points do not divide evenly into 20-second windows.

Window bounds are half-open, and the last one is the exception. A point landing exactly on a boundary belongs to the window that starts there: 10:00:20 goes to bucket 2, not bucket 1. The end of the period is the one place this does not hold — 10:01:00 would open a fourth window out of three, so it is clamped into bucket 3 instead.

COUNT here sums the raw values, it does not count how many points landed in the bucket. Bucket 1 above sums to 1 + 2 = 3, not “2 points”, and bucket 3 to 4 + 5 = 9. This is a quirk of how bucket aggregation is implemented — worth knowing if a resampled COUNT series looks larger than expected, since it isn’t literally a point count per bucket.

An empty (or already point-less, e.g. resampleTargetPoints left unset) series is returned unchanged — resampling never invents points that weren’t there after filtering.

A series with no more raw points than resampleTargetPoints asks for is also returned unchanged, with its original timestamps untouched. Resampling only ever removes points, so once the series is already at or under the requested point count there is nothing left to reduce.