Skip to main content
Question

read user attributes only


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

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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings