Skip to main content
Version: 0.18.3

Sample

Sample lets you see a small number of rows from a given dataset either in the original order or randomly. You can sample the entire dataset, a portion (such as a random sample or a percentage) of the dataset, or rows that meet a given condition. When sampling a dataset, the returned sample becomes the current dataset.

Format

Sample uses a single utterance: Sample the dataset <dataset> (<randomly>) (where <column> is <predicate>) (then select <limit> rows | with percentage <percentage>)

Parameters

Sample uses the following parameters:

  • dataset (required). The dataset to sample.
  • randomly (optional). Whether the sample should be drawn randomly.
  • percentage (optional). Whether the sample should be drawn as a percentage of the dataset.
  • column (optional). The column whose values to use as part of the sampling criteria.
  • predicate (optional). The predicate used as part of the sampling criteria.
  • limit (optional). The desired sample size.

Output

If the dataset is successfully sampled, the sampled dataset becomes [dataset]_Sample.

Examples

To sample the dataset, enter Sample the dataset <dataset name>.

To sample the dataset randomly with a sample size of 50, enter Sample the dataset <dataset name> randomly then select 50 rows.

To sample 15% of your dataset, enter Sample the dataset <dataset name> with percentage 15.

To sample only the rows in the dataset where the values of the Age column are greater than 18, enter Sample the dataset <dataset name> where Age is greater than 18.

To sample only the rows in the dataset where the values of the Age column are greater than 18 with a sample size of 20, enter Sample the dataset <dataset name> where Age is greater than 18 then select 20 rows.