Instead of creating a new attribute in the workspace (WeightedAttribute) and then exposing it in the custom transformer, we could have instead created an Attribute Name user parameter in the custom transformer directly.

Prepare for the FME Certified Professional Exam. Study with flashcards and multiple-choice questions; each question includes hints and explanations. Ensure your success!

Multiple Choice

Instead of creating a new attribute in the workspace (WeightedAttribute) and then exposing it in the custom transformer, we could have instead created an Attribute Name user parameter in the custom transformer directly.

Explanation:
You can drive behavior in a custom transformer with user parameters, including an Attribute Name parameter, so the output attribute can be named at runtime without pre-creating it in the workspace. This makes the transformer self-contained and reusable: configure the attribute name when you drop the transformer into a workspace, and the transformer creates or updates that attribute accordingly. For example, the transformer’s internal AttributeCreator can use the value of the Attribute Name parameter to write the computed result to whatever attribute name you specify, removing the need to define WeightedAttribute beforehand. This approach is flexible and avoids workspace edits; it doesn’t require a published parameter and isn’t limited to a fixed string—the parameter simply supplies the attribute name.

You can drive behavior in a custom transformer with user parameters, including an Attribute Name parameter, so the output attribute can be named at runtime without pre-creating it in the workspace. This makes the transformer self-contained and reusable: configure the attribute name when you drop the transformer into a workspace, and the transformer creates or updates that attribute accordingly. For example, the transformer’s internal AttributeCreator can use the value of the Attribute Name parameter to write the computed result to whatever attribute name you specify, removing the need to define WeightedAttribute beforehand. This approach is flexible and avoids workspace edits; it doesn’t require a published parameter and isn’t limited to a fixed string—the parameter simply supplies the attribute name.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy