Add Fields (multiple) could import from existing table or feature class template

255
2
10-08-2021 10:41 AM
Status: Open
Labels (1)
TimMinter
Occasional Contributor III

I'm building a ModelBuilder model and I want to re-use the fields in an existing geodatabase table to populate and then edit the "Add Fields (multiple)" GP tool.  I will craftily move those fields around to change their order ;-), change the definitions on a couple of them, remove some, and add some.  Do I want to manually enter all 79 (or worse) of those fields and risk going over the limit of however many clicks I have left in my carpal tunnels?  No, I do not.  Nope.  What I want is to import the fields from my template table to populate the "Add Fields (multiple)" GP tool and then burn some clicks on the arguably valuable changes.  Can I do it?  Nope, not yet in ArcGIS Pro 2.8.2 (2.8.3 is out, but release notes don't suggest an update would help me with this idea).  Would love to be able to do it soon.

TimMinter_0-1633714625389.png

TimMinter_1-1633714634812.png

Stringing up those two GP tools does not populate the "Add Fields (multiple)" field list.  Tried, failed.

tim

2 Comments
BillFox

Will a join and export help you?

or maybe create new with import from

TimMinter

HI Bill,

Unfortunately, no.  I need a way to inject changed table schemas, including field order, into a relatively static enterprise geodatabase schema that uses db views to ETL data from an incoming spreadsheet that occults the source system schema (it shall forever be unknown to me/us) to a product set of enterprise geodatabase feature classes and tables that staff and various apps/systems use.  When the source system has schema changes that impact my ETL, I have to go and jiggle the staging tables that receive the spreadsheet content, ArcGIS-friendly tables with curated field definitions (and order), and the db views so that I don't have to change the schema for the product feature classes and views and bust a bunch of stuff.  Whew.

My idea above would help because I could pop open the Add Fields (multiple) GP tool in a model, adjust the field definitions (and order), generate a schema that matches the source system changes, and carry on with the change.  As it stands, I can do that, but it takes days and thousands of clicks to set it up the first time.  When there are major source system changes, a fresh setup helps avoid errors.  If I could point the tool at the staging tables when setting up, then far fewer clicks would be involved and the opportunities for errors decrease.

tim