Skip to main content
Hi, I'm wondering how you "ESRI folks" represent an FME list attribute when you write to ESRI Geodatabase (preferably using the API without checking out an ArcObjects license) ? Also, same question goes for the SHAPE format?
Hi,

 

 

you would normally use a ListIndexer or a ListExploder to demote the list items into regular attributes before the writer.

 

 

Hope that answers your question.

 

 

David
And how would you dynamically write these new attributes to a new Featuretype? Ie. without defining mylist_1, mylist_2, mylist_3 - as this will vary depending on the input-file. So some Features will have

 

mylist_1 and mylist_2

 

 

however some other will have

 

mylist_1, mylist_2, mylist_3

 

 

and the next run with a different input-file might has even attributes up to mylist_1976

 

 


If you have a list in FME that you want to preserve in the Geodatabase, the best-practice solution would be to normalize the data to several ouput tables. Example:

 

 

--- A feature in FME

 

 

FID: 1

 

Name: MyFeatureName

 

Values{0}: 2

 

Values{1}: 4

 

Values{2}: 6

 

Values{3}: 8

 

 

--- Output from FME

 

 

Main table in the Geodatabase (1 record)

 

 

FID: 1

 

Name: MyFeatureName

 

 

Secondary table in the Geodatabase (4 records)

 

 

FID: 1

 

Value: 2

 

 

FID: 1

 

Value: 4

 

 

FID: 1

 

Value: 6

 

 

FID: 1

 

Value: 8

 

 

You would then typically create a relationship in e.g. ArcCatalog to join these two tables together when using ArcGIS based tools.

 

 

This solution completely avoids having attributes like "mylist_1976" etc.

 

 

David
Useful input David R! I see that lists are supported when using the ArcObjects based writer, not the file API.

 

 

The solution in question is part of a download portal, and I need to produce the best possible result using the geodatabase file api. So I've designed a solution where all lists are iterated and all pars are "converted" to standard attribs with an underscore number (attribA, attribA_1, attribA_2 etc). Therefore I don't really know how many attributes I have per object - it varies on the same feature class - and I have to write dynamically. Trouble is the result contains the maximum number of list attrbs for every object.

 

 

Is it possible to write different number of attributes per object on the same feature type in FME & not end up with tons of empty fields??
Did you ever get a useable answer for shapefiles?

 

I have a similar situation where I need to write out a histogram .  

 

 

Going from list to attribute is easy enough, but I can't figure out how to dynamically add those atrributes to the shape writer.

 

 

 


Reply