In your custom transformer, under Transformer Parameters on the left, under advanced what do you have Incoming Attribute Preservation set to?
In your custom transformer, under Transformer Parameters on the left, under advanced what do you have Incoming Attribute Preservation set to?
If it's set to selected attributes, how would you alter that dynamically based on a user parameter?
If it's set to selected attributes, how would you alter that dynamically based on a user parameter?
The options are All Attributes, Automatic or Drop Attributes - if it's currently set to All Attributes all incoming attributes will be present in the output irrespective of what is happening within the custom transformer. It's probably not the only thing that would need to be changed but it's hard to say without seeing the detail.
In your custom transformer, under Transformer Parameters on the left, under advanced what do you have Incoming Attribute Preservation set to?
@egomm I guess I didn't explain it well. I need to keep my incoming attributes. What I am getting are attributes from the 'Choice' User Parameter that the user did not choose.
Example:
The user wants just AADT for a roadway, they'd select it like this:
The custom transformer uses a TestFilter to send data down the appropriate transformers based on the user's selection. Here is a snippet of the model:
A FeatureMerger uses a User-Defined unique ID from their incoming attributes to merge everything back together. And here's the inspector from the output:
Why am seeing 'SurfaceType'-related attributes in my Output when the user only selected AADT? What is also odd is that these extra attributes show up in the Table View of Inspector, but not in the 'Feature Information' panel of Inspector.
Yes, i misunderstood. I thought you were saying that the attributes still exist, when in fact they are missing. The user interface will still display names of attributes that are dynamically removed even when they are not there. 'Missing' in FME terms, means the attribute does not exist.
What is your final output? Typically when doing something dynamically, a dynamic schema handles which attributes get written out, the fact that they are displayed in the inspector is not relevant.
Yes, i misunderstood. I thought you were saying that the attributes still exist, when in fact they are missing. The user interface will still display names of attributes that are dynamically removed even when they are not there. 'Missing' in FME terms, means the attribute does not exist.
What is your final output? Typically when doing something dynamically, a dynamic schema handles which attributes get written out, the fact that they are displayed in the inspector is not relevant.
@egomm Thanks.It's a little confusing that 'Missing' attributes are the Inspector. But I'll move on.
If you opened FME Data Inspector from the Inspector transformer embedded in a workspace, the columns of the Table View will be configured based on the attributes which are exposed on the interface of FME Workbench, regardless whether the feature has the attributes at run time. <missing> represents that the feature doesn't have the attribute actually.
On the other hand, the Feature Information window shows only attributes which the feature has. Missing attributes (i.e. ones which the feature doesn't have) won't appear there.