Sample Tool

The Sample tool limits the data stream to a specified number, percentage, or random set of the rows.

Configure the tool

  1. Select the type of sample. The options are:
    • First N Records: Returns the records in the table up to the specified N record.
    • Last N Records: Returns the records in the table starting with the specified N record.
    • Skip 1st N Records: Returns all records after the specified N record, skipping all records before and including N.
    • 1 of every N Records: Returns the first record of every specified N record.
    • Random 1 in N Chance for each Record: Randomly selects a record of every specified N record.  Designer is using truly random methodology, therefore N is merely an approximation.
    • Random sample output

      If you have 1000 records and select a random sample, and specify N as 10, you expect to get 100 records returned, but because the sampling is random, you may get anywhere between 75 and 150 records returned.

    • First N% of Records: Returns the specified N percent of records. Selecting this option requires the data to pass through the tool twice: once to calculate the count of records and then to return the specified percent of records.
  2. Type a number in the N= box to specify the value for N.
  3. Grouping Fields (Optional): If a group or groups are specified, N records will be returned for each group.