Skip to main content

Looking to drop a shp file into workspace and extract the data type of each field. e.g. Address.shp may have fields StreetName (text) and StreetNumber (int). I would like to be able to extract the type for each field:

StreetName - fme_char(254)

StreetNumber - fme_int32

 

I understand that FME maps the Data Types from different files based on the reader being used to an equivalent FME Data Type https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!FeatureTypeProperties/attribute_types.htm

There is a Reader called Schema. I think it would give you the info you are looking for.


Another option is to use FeatureReader to read the shapefile and choose to read Schema features only. The schema is returned as a list, so you would need a list exploder to break each list element into multiple features.


Another option is to use FeatureReader to read the shapefile and choose to read Schema features only. The schema is returned as a list, so you would need a list exploder to break each list element into multiple features.

I think this way works the best for my use, as I can just drop in one shape file and specify a user parameter in the FeatureReader transformer to extract the schema from it.


Reply