Skip to main content
Question

read user attributes only

  • August 10, 2015
  • 3 replies
  • 10 views

In FME workbench, How can I validate READER feature type user attributes name, type and width with the predefined values.

 

 

for ex in Arcgis(arcobjects) , i do this by creating a predefined list of fieldnames . i loop through predefined list to check if the fieldname exist ,if yes then  i will read type,width,precion,length using pfeatlyr.FeatureClass.Fields.Field[j].Type,

 

 pfeatlyr.FeatureClass.Fields.Field[j].Length

 

pfeatlyr.FeatureClass.Fields.Field[j].Name

 

 

similarly how can i achieve this in FME
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.

3 replies

david_r
Celebrity
  • August 10, 2015
Hi

 

 

I'm not sure I fully understand, but if you need to validate the input schema, either use a "Schema (any format)" reader (http://docs.safe.com/fme/html/FME_ReadersWriters/FME_Readers_Writers.htm#schema/Feature_Representation.htm%3FTocPath%3DFME%2520Readers%2520and%2520Writers%7CSchema%2520(Any%2520Format)%2520Reader%7C_____3) or a FeatureReader transformer. You will then get one feature per table with a list containing the field names and their definitions (data type and length).

 

 

David

  • Author
  • August 10, 2015
Hi David,

 

 

I donot want to loop through features and get values . I want to read only the fieldnames[column name] and their datatype using *.shp files

 

 

As u can see in image below ,the navigator pane has 8 fieldnames and their datatype.

 

 

i want to read and validate them .

 

 

.

david_r
Celebrity
  • August 10, 2015
Hi

 

 

Do not use the FILEGDB reader, use the "Schema (any format)" reader. It will only output one single feature containing the schema definition, regardless of the Shape file contents.

 

 

David