Row Sampler

This node extracts a sample (a bunch of rows) from the input data. The dialog enables you to specify the sample size.

Options

Output size type
Defines how the size of the output is specified: as a percentage of total rows (relative) or as an absolute number of rows.
Relative size
Specifies the percentage of rows from the input table to be included in the output. Must be between 0 and 100 (inclusive).
Number of rows
Specifies the absolute number of rows to include in the output. If the input table contains fewer rows than specified, all rows are placed in the output.
Sampling strategy
Determines how rows are selected for the output. Strategies include random, stratified, linear, and first rows (sequential).
  • Random: Randomly selects rows from the input table. You can optionally specify a random seed for reproducible results.
  • Stratified: Preserves the distribution of values in the selected group column. You can optionally specify a random seed for reproducible stratified sampling.
  • Linear: Selects rows evenly spaced across the input table, always including the first and last row. This method is useful for downsampling sorted columns while preserving boundary values.
  • First rows: Allows you to select the top-most rows of the input table.
Group column
Specifies the column whose value distribution should be preserved in stratified sampling. Ensures both selected and non-selected rows reflect the same distribution of values.
Fixed random seed
Optional seed value for random or stratified sampling. Using a seed ensures the same rows are selected each time the node is executed. Without a seed, a different random selection will occur each time.
If input table is empty
Defines how the node should behave when the input table has no rows. Options include generating empty outputs or failing the execution.

Input Ports

Icon
Table to sample from.

Output Ports

Icon
The sampled table.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.