Skip to main content

In a custom transformer, I tried to use BulkAttributeRenamer to add one of the parameters as prefix to a selected set of attributes, see attached image. But it does not seem to do anything in 2016.1 version. Wonder if anyone has an workaround. Thanks!

If you passed an attribute value to the parameter through the parameters dialog in the Main workflow, it may seem to do nothing because Workbench doesn't know the attribute value (i.e. prefix) when you are creating the workspace. However, I think the specified attributes will be renamed at run-time. Check the translation result with the Logger or the Feature Information pane of Data Inspector.


There are a couple of things necessary for this to work.

1) Create the custom transformer using "Handle With Published Parameters" for the Attribute References. If you don't do this then you will have to expose everything manually, which sort of defeats the purpose.

2) Create the custom transformer with the source data connected. If not the transformer won't know what attributes to expose inside it. The workaround here is to go to the Input port inside the transformer, open its properties dialog, and exposed the connected attributes there.

When I do these, then all works as you would expect (2016.1)


There are a couple of things necessary for this to work.

1) Create the custom transformer using "Handle With Published Parameters" for the Attribute References. If you don't do this then you will have to expose everything manually, which sort of defeats the purpose.

2) Create the custom transformer with the source data connected. If not the transformer won't know what attributes to expose inside it. The workaround here is to go to the Input port inside the transformer, open its properties dialog, and exposed the connected attributes there.

When I do these, then all works as you would expect (2016.1)

Mark, By exposing attributes in the input port of a transformer, we are "hard-wiring" the customer transformer with the workspace, am I right?

 


If you passed an attribute value to the parameter through the parameters dialog in the Main workflow, it may seem to do nothing because Workbench doesn't know the attribute value (i.e. prefix) when you are creating the workspace. However, I think the specified attributes will be renamed at run-time. Check the translation result with the Logger or the Feature Information pane of Data Inspector.

@takashi, you are right, the attributes under the new names actually were created in memory. This led to my solution below. Thank you!

 


Comments @takashi and @Mark2AtSafe help me solve this issue. The BulkAttributeRenamer did its work in memory, I just needed to ensure the custom transformer's Attribute Output mode was set to "All Attributes!"


Reply