Question

How to shorten attribute names?


I am trying to read from an Esri SDE and write to a shapefile, but the length of the attribute names are causing problems for the writer. I've tried using AttributeRenamer to manually make all the attribute names under 10 characters, but is there any other way to address this problem? I'm using FME 2014.


2 replies

Userlevel 2
Badge +17

Hi @kevwin, I think that the SHAPE writer will shorten long attribute names automatically, if you apply Dynamic Schema option to the writer. See this article to learn more about dynamic schema: Basics of Dynamics (and related articles linked in this page).

If the dynamic schema option cannot be applied to your workspace for any reason, the SchemaMapper could be a better solution than the AttributeRenamer.

Userlevel 1
Badge +10

In 2015 you can use the BulkAttributeRenamer to shorten names to 10 characters using some regular expression replacement

Text to find:(?<=^.{10})(.*)

String:

However, this doesn't appear to work for me in 2014, although the option for Regular Expression replacement appears to be there.

Reply