Skip to main content

HI,

 

I have a gdb with a lot of feature classes and I need FME to search thoroug the content of each layer and give me the list of all attributes from each layer that meets certain tester requirements. I was thinking of usint Attribute Validator but the content of the gdb will be changing hence adding attributes manually to each tester is going to be very time consuming. I need FME to search thorouhg the content of each layer saved in the gdb and give me the attributes

 

So just to be clear, do you want to test on attribute names or attribute values?


Hmm, maybe the AttributeExploder? This will create a new feature per attribute

so attributeName and attributeValue 

You need to be a bit careful because this can create a tonne of features - but it should make it so you can just test the attribute value for whatever you want and you can easily get back the attirbute name and the feautre_type_name


Hmm, maybe the AttributeExploder? This will create a new feature per attribute

so attributeName and attributeValue 

You need to be a bit careful because this can create a tonne of features - but it should make it so you can just test the attribute value for whatever you want and you can easily get back the attirbute name and the feautre_type_name

Using the list option in the AttributeExploder might be a little more efficient than the feature option in this case. 

A python solution might be the better solution here, but more clarification needed as @redgeographics mentioned.


Hmm, maybe the AttributeExploder? This will create a new feature per attribute

so attributeName and attributeValue 

You need to be a bit careful because this can create a tonne of features - but it should make it so you can just test the attribute value for whatever you want and you can easily get back the attirbute name and the feautre_type_name

 

Or save it as a list and use a listsearcher.


I need to test the values of attributes. The issue is that the name of the attributes may change


I need to test the values of attributes. The issue is that the name of the attributes may change

Have a look at the AttributeValueSearcher :)
https://hub.safe.com/publishers/abley-limited/transformers/attributevaluesearcher


That is almost perfect. Is there a way to show only the attributes that meet the regex? For example I would like to see only MulipleLines as it meets the regex

 


That is almost perfect. Is there a way to show only the attributes that meet the regex? For example I would like to see only MulipleLines as it meets the regex

 

 The matched attributes are in a list called “_found{}”
 

 


thank you for the hint but the _found{} list is empty althouth the value is present in the Found port. What am I doing wrong?

 

 


Okay, i’ve found a bug in the custom transformer; this is one we (Abley) have made.
I’ve updated it on the hub (now version 3). You can edit your existing instance like so...

If you edit the custom transformer (right click, edit)
 


Then open up the PythonCaller towards the right of the canvas
 

At the bottom in the Attributes to Expose box, make sure the values read:

_found{}.value _found{}.attribute

 


Reply