Skip to main content

I have a feature class within a FGDB that contains 2631 fields that are named F1 to F2631 and looking to query certain fields from this main feature class to write out to a new feature class. For example the first i'm trying to write out as a new feature class I want to write out fields F1 to F40. Attribute Manager appears to struggle to remove fields F41 to F2631 when i try to use this transformer and crashes FME on me. I've been trying to figure out a way to query the fields i plan to remove within Bulk Attribute Remover but cant figure out how to complete the query?

Any suggestions ?

BulkAttributeRemover seems to be working with a regular expression. If you are not familiar with those you can also try the AttributeKeeper which is lighter compared to AttributeManager.

 

If it still crashes, you could also try to do in steps -and not all at once- and work your way towards the final result.

 

Hope this helps 🙂


Use a BulkAttributeKeeper, it's a custom transformer which simply inverts the BulkAttributeRemover.

Then for regex queries I always check GPT4, it gives this, which looks right to me:

^(F[1-9]|F1[0-9]|F[2-3][0-9]|F40)$

And it gives a description of what that is: https://chat.openai.com/share/949c8b6d-9d01-4e20-893a-9de094969000

 


Hi Chrisnovak

 

i am quite surprised by the number of fields you have in the gdb. The max number of fields you can have in personal gdb is 255, unless you are using an SDE or other database. Maybe that causes the crash?

There are quite a few transformers that can handle attributes, if the number of the attributes you want to keep is less than the ones to be removed, the easier to use an Attribute keeper. you could also use the Bulk Attribute remover writing an expression for example isolating the 2 first digits not to be larger that 40 but this could be tricky.

 


This regex should work in a BulkAttributeRemover

^Fo4]>1-9]$|^F95-9]F0-9]$|^F90-9]{3,4}$

But an AttributeKeeper would probably work just as well

 

I find the AttributeManager performance pretty poor in general


Reply