Skip to main content
Question

Test the type of attribute and test attribute value

  • May 9, 2017
  • 5 replies
  • 498 views

mgeomaticien
Contributor
Forum|alt.badge.img+1

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,

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • May 9, 2017

itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • May 9, 2017

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.


mgeomaticien
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 11, 2017

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


itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • May 11, 2017

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


mgeomaticien
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 11, 2017

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