Preserves either a total number of features or a sampling of features, depending on the Sampling Type selection. The remainder of the input features are discarded.
This transformer is typically used during testing to reduce data volume by arbitrarily discarding data.
When specified, this parameter affects the behavior of the two sampling types. For example, say the Sampler receives a set of 15 features. Using the Group By parameter, the Sampler breaks the features into 3 groups.
- Group 1 has 3 features
- Group 2 has 5 features
- Group 3 has 7 features
This table shows how sampling amount and type affect the Group By results:
|Sampling Amount||Sampling Type||Result|
|4||Every Nth Feature||
|4||First N Features||
Determines the number of features to keep: either a total number of features, or a sampling of features.
- 1: No data will be discarded: the same number of features will be the same for input and output.
- 0: All input data will be discarded.
|Sampling Rate||Sampling Type||Result|
|2||Every Nth Feature||Every second feature will be kept.|
|10||First N Features||Only the first 10 features will be kept. All subsequent features will be consumed by the transformer.|
When this parameter is left at the default setting of No, the transformer works with features in the order in which they are received.
Setting this parameter to Yes is equivalent to shuffling the input features before they are sampled. The output ports still return features in the order they were received by this transformer. When this parameter is Yes, All features are blocked in the Sampler until the last feature arrives.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.