I have a list of possible errors in an Excel table and I am importing it as a Reader. I run more than 100 controls on my data and I generate a txt file with the data that don't pass the tests and what kind of an error each dataset has. This information I'm current retrieving by using Testers to pass the desired Error each time to the LogWriter. The problem is that this requires more than 100 connection plus the Testers.

I would like to pass this Excel table to a list and treat it as a user parameter and retrieve the desired element each time using the Text Editor of the LogWriter.

enter image description here

1 Answer 1


If I understand correctly, you have 100 LogWriters, each with a hard-coded message. You would like to have 1 LogWriter, where the message comes from the Excel table. Is that correct?

Regardless, I don't think a user parameter is the way to go. A user parameter is a single value, fixed when you press the run button. Instead, you need to use an attribute value. So you read the Excel file and tag each bad feature with the appropriate test, as an attribute.

The thing is, how do we match the failed feature to the Excel error? You would need a key of some sort to join them together, which you'd set after each Tester. In short, you would have as many join transformers as you do Testers, which is still not ideal.

So, I think it would be better to reconsider how the tests are made. I can think of a few methods. The first is an AttributeManager with conditional values.

enter image description here

enter image description here

Here I've said, if the ParkName is Null, then the error is "NullParkName". I could write that Error attribute directly as the log message, or I could use it as a key to join to the Excel file to retrieve more information.

This is virtually the same as you have, but the Tester is buried in the AttributeManager alongside setting the Error message.

Another method to reduce your workspace size is to use a TestFilter instead of multiple Tester transformers.

enter image description here

Here I have multiple tests being carried out. It's like each of these is a separate Tester. This reduces your testing transformers from 100 to 1. If you have the controls set to "All Passing Ports" then each error will produce a result (so one feature might produce multiple failure messages).

Yet another method would be to use a SchemaMapper transformer. That is similar in that you specify all the tests you want to carry out, and can set an attribute value in response. The tests are defined in a separate file - like an Excel spreadsheet - so this could be the perfect solution, depending on how your Excel file is structured.

enter image description here

I won't go into too much detail here, but there are lots of SchemaMapper resources on the FME Community knowledge base, for example, this tutorial.

I hope one of these solutions is a help. For sure, you don't really want to have 100s of transformers of the same type, when one will be enough, and these methods will help, depending on how comfortable you are with them.

  • Thank you very much @Mark for taking the time to suggest solutions but I have a lot of different tables with geometry that are merged and the tests are more complicated than simple attribute tests. When I can I create multiple tests in one but it is not always the case. Unfortunately I can not reduce the multiple tests. Commented Jan 20, 2023 at 9:42
  • If you're using Tester transformers then the same tests can be carried out in both the TestFilter or AttributeManager (less so for the SchemaMapper). But maybe I'm misunderstanding the problem that you're asking for help with here? Maybe the tests is not where the problem lies? Commented Jan 20, 2023 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.