Syntax FACTORY_DEF SamplingFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* SAMPLE_RATE [OUTPUT (SAMPLED|NOT_SAMPLED) FEATURE_TYPE [ ]* []*]* Overview This factory samples the input features at a specified rate and divides them into two groups: those which are matched by the sampling rate, and those which come between the sampled features. The first input feature and each feature thereafter is considered a "sampled" feature. However, when the sample rate is negative, then the sampling factory behaves differently. For example, if the sample rate is -1, then only the first feature will pass as sampled. Similarly, if sample rate is -2, then only the first two featurers will pass as sampled, and so on. The SamplingFactory is useful to test mapping files being developed for large data sources as it can greatly reduce the number of features processed by the system. A sample rate of 1 passes all features through the factory. This can be used to apply a feature function to every translated feature. A sample rate of 0 tells the SamplingFactory to treat all features as unsampled features. A sample rate of -1 tells the SamplingFactory to pass only the first feature as sampled feature. Note: Older versions of this factory did not support any output clauses, and simply wrote out the sampled features. To maintain backward compatability, an instance of the SamplingFactory which has no OUTPUT clause will behave as if a clause of "OUTPUT SAMPLED FEATURE_TYPE *" has been specified. This is non-standard FME behavior. Output Tags The SamplingFactory supports the following output tags. SAMPLED Features that occur at the specified are output with this tag. NOT_SAMPLED Features that come between the sampled features are output with this tag.