0 ×

DB Sampling

KNIME databases nodes version 0.9.0.v201807081650 by KNIME AG, Zurich, Switzerland

This node sample rows from a database table. The dialog enables you to specify the number of rows so sample and the sampling strategy. The following options are available in the dialog:


Specify the absolute number of rows in the sample. If there are less rows than specified here, all rows are used.
The percentage of the number of rows in the database table to extract. Must be between 0 and 100, inclusively.
Take from top
This mode selects the top most rows of the table. Note that the order of the rows depends on the connected database.
Draw randomly
Sample rows in random order if the connected database supports random sampling. Note that this method might be very slow for large database tables.
Stratified sampling
Check this button if you want stratified sampling, i.e. the distribution of values in the selected column is (approximately) retained in the output table.
Random seed
Check this option if you want to provide a seed number for random sampling.

Input Ports

Table in database to apply database sampling

Output Ports

Table in the database with sampled rows

Best Friends (Incoming)

Best Friends (Outgoing)


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.