Sampler

From fmepedia

Sampler is a Workbench Transformer.


Table of contents


Description

The Sampler can be set to only pass through one in every n features, or the first n features. Use this if you have a lot of data but don't necessarily have to process each and every one of them or if you have just sorted your data and only want the first n features.


Alternate Use

  • The Sampler can also be useful as a placeholder within a translation, bringing many feature connections together. For example, if you have 50 source feature types that will all go through the same pipeline, connect them all to a single Sampler. You can place the Sampler away from the rest of the pipeline. This can help keep the workspace tidy.
    • Good idea - and one that inspired me to create the Null Custom Transformer - one that does nothing whatsoever, but is useful as a placeholder.



Example

The attached workspace shows an example use of the Sampler transformer.

In this example a set of student exam results are generated. The students are then sampled in two different ways; the first 10 students and every 10th student.


Workspace Screenshot

Attached Files
filesizedate
Sampler Example.jpg122.9 kB08/18/09
Sampler Example.zip95.4 kB08/18/09
User Comments Add a new comment