span8
span4
span8
span4
Why not surf FME Hub?I have several solutions published in the FME Hub for a long time.e.g.
etc.
Note: Some of them are experimental.Depending on FME version, may not work as expected.
@jdh, thanks for the work around!
Just communicated with Safe tech support on the case, FYI -
This issue has been previously reported as problem report PR# 58160 - Custom Transformer Framework: Undefined macro dereferenced in file.Development has reported that the issue is the published parameter looking reference in the output port or attribute name name.Because of how custom transformers work, that published parameter is prefixed so doesn't really exist at runtime.Hence the error.This attribute / output port was returned because the port name was automatically generated based on their condition.
The only way I've successfully output a parameterized attribute name in a custom transformer is to use a StringConcatenator with the New Attribute set to the Custom transformer parameter and the string expression set to the temporary attribute (that you want to rename).Follow that by an AttributeRemover to remove the temp attribute, and you end up with a custom transformer (CT) that behaves like any other transformer in regards to propagating attributes.
ie if you set the AttributeName parameter on the CT to "abc' than the rest of the workspace will have access to the abc attribute. If you set it to a workspace parameter then the rest of the workspace will have access to $(UserAttr) which at runtime will be whatever the user specified.
Hi
Which version of FME are you using?I just tested FME 2016.1 and it works fine.
FME 2015.1.3.1 didn't manage it, however, but you could accomplish the same using a PythonCaller:
import fmeobjects def FeatureProcessor(feature): newName = FME_MacroValues['pEvent_Route_ID'] value = feature.getAttribute('_pEvent_Route_ID') feature.setAttribute(newName, value) feature.removeAttribute('_pEvent_Route_ID')
David
@jryanand@david_r, Using AttributeRenamer or AttributeManager to rename an attribute to a value represented in a published parameter results in error.Seeselection-157.png.Please kindly advise how you did this.
© 2019 Safe Software Inc |Legal