Skip to main content

I am using a test filter to filter out all the different values of a feature type. 

In this case there are 21 different values, so I have to manually create 21 different test conditions. Is there a way to automatically create the test conditions?

 

I also have features with more that 50 different values, which would be a lot of work to filter out manually.

 

 

 

If it's single, unique, values you want to test for you can use the AttributeFilter and have it import those unique values from your source dataset.


You can use a FeatureTypeFilter based on the current input. There is an update button within the transformer that will import all feature types automatically.

 

On a slightly unrelated note, I notice that most of the feature types in your example are being used in a common process next. Instead of using '=' and many output ports, you can use the 'In' operator and use only one output port. Feature types just need to be comma separated in the right value. It helps to clean up the workbench, and is easier to build the test.Capture

 

Or you can rename the output port to get the same result...

Capture2


Another solution might be to run the workspace with caching up until the TestFilter. Then you can use the caches values in the test conditions. You still have to create separate tests, but at least you aren't having to type in values all the time. You'll need FME2020.1 or newer to handle this.

Alternatively, the FeatureTypeFilter might help.


Reply