Skip to main content

sample

Class: core · Streaming: accumulating

Random sampling. sample 1% is streaming Bernoulli sampling; sample 10000 is reservoir sampling.

Signature

| sample <n-or-percent> [seed=<int>]

Positional Arguments

NameTypeRequiredDescription
n-or-percentexprYesrow count for reservoir sampling, or percentage with % suffix for Bernoulli sampling

Options

NameTypeDefaultDescription
seedint-optional deterministic random seed

Examples

sample 1% seed=42
sample 10000

Generated from the LynxFlow registry. See RFC-002 for the full language specification.