Skip to main content
Question

How to convert all the attribute names of all the feature classes within a File Geodatabase, to uppercase?


Forum|alt.badge.img
How to convert all the attribute names of all the feature classes within a File Geodatabase, to uppercase?

5 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • May 31, 2023

I would look into the BulkAttributeRenamer with action set to Change Case.


Forum|alt.badge.img

Yes i am currently using that but it only seems to work for a single feature class. How can I read in and write out multiple feature classes in one go?


chriswilson
Supporter
Forum|alt.badge.img+11
  • Supporter
  • May 31, 2023

When you read the geodatabase and the parameters pop up select the 'Single Merged Feature Type' rather than 'Individual Feature Types' option - this will create one data stream in FME Form (Workbench) which you can put through the BulkAttributeRenamer - this should enable this functionality for all of your feature classes in the gdb.

 

image 

Or just direct each of your feature types (if you read them individually) to all flow into the BulkAttributeRenamer, for the same effect, but there's really no need to do this and just means more clicks.

 

If you wanted to change the feature class names as well you'd need to expose the fme_feature_type attribute in your reader, but it seems you may not want to do this on this occasion.


Forum|alt.badge.img

Rather than iterating through each of the feature classes, changing the case of the attribute names to uppercase and then saving them as distinct feature classes (just as they were to start with) in a new geodatabase - this workflow seems to merge all of the attributes together and then attempts to write them out to all feature classes, ultimately failing when it tries to write to a feature class with the wrong geometry.

imageI wish to maintain the same structure as the source geodatabase, except that all attributes are in uppercase. Can this be done?


chriswilson
Supporter
Forum|alt.badge.img+11
  • Supporter
  • June 1, 2023

So in that case you could use a BulkAttributeRenamer for each data stream e.g. Intensive_Agriculture --> BulkAttributeRenamer-->Intensive_Agriculture then Invasive_Non_Native_Species_Point-->BulkAttributeRenamer-->Invasive_Non_Native_Species_Point

 

Or remove irrelevant attributes from your writer feature types (manual mode, not automatic) in your screenshot example See here on writer feature type attributes and the different ways of dealing with them (in this case you will probably want to avoid dynamic as it will be more complex): https://desktopmanualbasic.safe.com/DesktopBasic4Components/4.16.WriterFeatureTypes.html


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