Question

Test the type of attribute and test attribute value


Badge

Hi all,

I'm new on using FME, I have a question that troubles me

At first I would like to check the type of an attribute (text, number, ...). Then I would test if the values of an attribute belong to a list of attributes already predefined.

An idea please ?

thank you in advance,


5 replies

Badge +22

Have a look at the AttributeValidator.

http://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/attributevalidator.htm

Badge +16

Hi @mgeomaticien,

To test the attribute type use the schema reader and for the value a attribute value mapper transformer can be used. Have a look at the transformers documentation on how the set invalid values so that you can afterwards easily test them.

Badge

Hi @jdh and @itay

Thank you for yours answers.

Please I have another question. I want to Check the presence of one or more layers (which I already know the names) and in each of the layers verifies the existence of one or more attributes (already known) when reading the data source.

I would also like to control the object type of each layer (polygon, point, line, text ...)

My data source is DWG file

Thank you in advance

Badge +16

You can use the fme_geometry attribute or GeometryFilter transformer to do that. JUst rememeber to expose the attribute.

Badge

You can use the fme_geometry attribute or GeometryFilter transformer to do that. JUst rememeber to expose the attribute.

Thank you. But before that I would like to check the existence of layers and attributes

 

 

Reply