Skip to main content
Solved

How to select attributes which are different for different features?


sparks
Contributor
Forum|alt.badge.img+5

I have a problem. First my FME:
 

It is partly in Dutch, but it doesn't matter here. It is about spatial data with some features. There are two feature readers: the first one to select features which fall within a pre-defined contour, the second to select features. The attribute manager to add some attributes. The featurewriter to write the data in gdb format.


 In the FeatureReader you can see attributes for “pand_v” and for “scheiding_v”. The attributes of “scheiding_v” are standard, hence the same for other features, except for “pand_v”. The difference is that in “pand_v” BGTPlusType is replaced by “identificatieBAGPND”. The features are of several geometric types: lines, polygons and points.

In the output of FeatureWriter all the attributes as given in the AttributeManager are shown. I'd like to see that for “pand_v” no BGTPlusType is given (there is no value here) and that for all other features no “identificatieBAGPND” is shown. And that some other attributes like fme_…, attribute{}…, etc., are not shown.

To be complete, here is the FeatureWriter:
 



How can I achieve that?

Best answer by takashi

"identificatieBAGPND” is defined as a user attribute, it's the reason why it would be a column in the destination schema. Since you have configured dynamic schema, you don’t need to define User Attributes generally, except a case where additional attributes should be defined statically.

Try removing all the rows as I mentioned before.

 

View original
Did this help you find an answer to your question?

8 replies

crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • June 19, 2025

Hi ​@sparks If I understand correctly, I think you want to remove attributes from the FeatureWriter ?

You can use the AttribtueKeeper or AttributeRemover in these cases. One might work better for you then the other. 
Did I understand correctly? I hope this helps.

 


takashi
Evangelist
  • June 20, 2025

Hi ​@sparks ,

You have configured dynamic schema in the FeatureWriter, so attributes you configured in the User Attributes table would be treated as additional attributes other than attributes provided by the schema definition.

Take a look at the User Attributes table, and try removing all rows from the table if any rows exist there.

In addition, you can directly connect the <Schema> port of the FeatureReader and the FeauterWriter if you would configure dynamic schema derived from schema feature.  


sparks
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 20, 2025

Hi all,

 

Thank you for your replies. I’m afraid that I'm understood incorrectly (I'm really bad in explaining the situation, my bad!). Let us focus on one issue I’m trying to solve.

If you look at the attributes of the feature “pand_v” in the FeatureReader in the picture above and notice the attribute  “identificatieBAGPND”. That attribute is specific for”pand_v”, other features have not that attribute. Other features have instead of it the attribute “BGTPlusType”. 

Now the output (as checked in ArcGIS Pro) is that all the features have the attribute  “identificatieBAGPND” which is I don’t want. I only want to see that attribute for the feature “pand_v”, not for other features. 

At the other side, I don’t want to see the attribute “BGTPlusType” for the feature “pand_v” as that feature has no attribute “BGTPlusType”. 

It seems that the schema is not working well here. Or is there another cause? It would be nice if this can be solved in case of different list of attributes for different features.

In short: for each feature, in the output only the attributes should be shown as given in the attributes list of that feature in the FeatureReader.


takashi
Evangelist
  • June 20, 2025

Have you checked the User Attributes tab in the FeatureWriter? I suspect that an attribute called “identificatieBAGPND” is defined statically in the User Attributes configuration.

Basically you don’t need to define any User Attributes statically, since you have configured dynamic schema.

 


sparks
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 20, 2025

This is my User Attributes of the FeatureWriter:

They are standard set to Dynamic because of the Dynamic Schema Definition. I’m sorry, I’m new to FME!


crutledge
Influencer
Forum|alt.badge.img+33
  • Influencer
  • June 20, 2025

@sparks No need to apologize for trying to explain complex wibbly wobbly workflows 🤣 I think I got it now. As ​@takashi dynamic schema should be handling that. But maybe if there are two schemas being read we have to select the one we want? Hope this helps. I still have a lot to learn with dynamic functionality.

 


takashi
Evangelist
  • Best Answer
  • June 22, 2025

"identificatieBAGPND” is defined as a user attribute, it's the reason why it would be a column in the destination schema. Since you have configured dynamic schema, you don’t need to define User Attributes generally, except a case where additional attributes should be defined statically.

Try removing all the rows as I mentioned before.

 


sparks
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 24, 2025

Hi ​@crutledge , thank you for the answer. I already have taken a look at the schema definition. However, there is only one to choose: “Schema From Schema Feature”. But thanks anyway!

@takashi , your solution works! Now I’m satisfied about the output! Probably I added the user attributes accidently by choosing the option “Automatic” and then back to “Dynamic”. As I have added two new attributes in the AttributeManager, they did not appear in the output in the first instance. By adding these two attributes in the User Attributes, with the Attribute Definition set to “Dynamic”, now I can see these two features in the output. 

I learned that so much, thank you!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings