âShow Table of Contents
The Sample tool limits the data stream to a specified number, percentage, or random set of the records.
- Select the type of sample. The options are:
Type a number in the N= box to specify the value for N.
Grouping Fields (Optional): If a group or groups are specified, N records will be returned for each group.
- 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. Alteryx is using truly random methodology, therefore N is merely an approximation.
Example: If you have 1000 records and select a random sample, and specify N as 10, you would expect to get 100 records returned. But because this 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.
Â©2017 Alteryx, Inc., all rights reserved. AllocateÂ®, AlteryxÂ®, GuzzlerÂ®, and SolocastÂ® are registered trademarks of Alteryx, Inc.