Skip to main content
Question

Startup script that reads features in file

  • January 9, 2019
  • 1 reply
  • 14 views

Forum|alt.badge.img

Hello,

I am trying to develop a startup python script, that will look at an incoming file and list the feature types that are within that file. Then compare against another list of mandatory feature types. Essentially I would like to make sure that required feature types exist in the file. I am fairly new to Python, and still learning, but any guidance would be helpful.

import fmeobjects

import fme

class FMEFeature(object):

value = fme.macroValues['SourceDataset_AUTOCAD_OD']

fme.getFeatureType(value)

#unsure what to do next

Thank you!

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

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • 1442 replies
  • January 9, 2019

Hi @david_prosack88,

You could use the Schema (Any Format) reader to read the feature type from both files and compare, no python needed.

Hope this helps,

Itay