Skip to main content

Maybe this is can be done in a very easy operation, but how can I create a general custom transformer?

I created a custom transformer in a workbench to process data A, it worked fine. Then I wanted to use it to process data B which has different attributes from data A, after I linked data B to custom transformer, it became a incomplete transformer, it can't read attributes from data B, how can I solve this problem, there's too many data I can't create custom transformer for every data.

It looks like your custom transformer expects a load of attributes and your second dataset doesn't have them all. I think (but it's hard to say without seeing what's inside the custom transformer) you're using a Matcher or ChangeDetector inside your custom transformer, which have a Group By option, if you expose that as a parameter for the custom transformer it should work.

When you create the custom transformer you have the option of using attribute references: any attributes that come in from the outside and are used inside the custom transformer will be shown as parameters of the custom transformer.

Then on the output port(s) you can specify which attributes from inside the custom transformer are to be passed on to the main workspace.


Hi @bobo,

This chapter on parameter handling from the FME Desktop Advanced course might be useful.

Itay


Reply