Skip to main content
Solved

Get the list of attributes and compare to another list to find missing

  • January 16, 2018
  • 1 reply
  • 96 views

akheirabadi
Contributor
Forum|alt.badge.img+6

Hi all,

I'm working on a project to automate transformation of more than 50 layers.

Just wondering is there any way I can get the list of attributes and types from each layer and compare it with another list to make sure it has fields and fields have types I'm expecting?

Best answer by jdh

You'll want to look at the Schema reader, which will produce a list with the attribute names and types.

attribute{}.fme_data_type

 

attribute{}.name

 

attribute{}.native_data_type

I tend to use python to compare two lists, but you could explode the attribute list and use a ChangeDetector.

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.

1 reply

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • Best Answer
  • January 16, 2018

You'll want to look at the Schema reader, which will produce a list with the attribute names and types.

attribute{}.fme_data_type

 

attribute{}.name

 

attribute{}.native_data_type

I tend to use python to compare two lists, but you could explode the attribute list and use a ChangeDetector.