Sample Transform
The sample transform randomly samples a data stream to create a smaller stream. As input data objects are added and removed, the sampled values may change in first-in, first-out manner. This transform uses reservoir sampling to maintain a representative sample of the stream.
Transform Parameters
| Property | Type | Description |
|---|---|---|
| size | Number | The maximum number of data objects to include in the sample. The default value is 1000. |
Usage
{"type": "sample", "size": 500}
Filters a data stream to a random sample of at most 500 data objects.