Browse the docs
Preparation node

Sample

Keep a subset of rows: the first or last N, skip N, every Nth, a 1-in-N chance, or exactly N at random.

Category
Preparation

What it does

Keeps a subset of rows without changing the schema. Choose first / last / skip N, every Nth row, a 1-in-N random chance per row, or exactly N random rows. An optional seed makes the random methods reproducible.

Inputs and outputs

InputsOne.
OutputsOne.

When to use it

  • Grab a quick preview slice
  • Take a representative random sample
  • Skip a header block or thin out data

Examples

First 100

First N rows → 100

Every 10th row

1 of every N rows → 10

A systematic sample.

Exactly 500 random

Random N rows → 500 (seed 42)

A seed gives the same draw each run.

1-in-20 chance

1 in N chance → 20

Result size varies.

Tips

  • Set a seed on the random methods for a reproducible sample.
  • Last N and Random read the whole input (they spill if large); a Test run only samples the 50-row preview.
  • The schema is unchanged; only rows are dropped.