AnsweredAssumed Answered

Add Fields to a joined table in memory

Question asked by jborgion Champion on Jun 18, 2019
Latest reply on Jun 19, 2019 by bixb0012

I'm working on a python script in which I create a couple of tables in memory, and then join them.  Then joined table will then be joined to a polygon feature class (that join is in memory as well) and finally the joined layer with all the joined attributes gets appended to a polygon feature class on disc.

 

The problem is with the append: I've never been able to figure out field mapping in arcpy, and I'd prefer staying away from it. The polygon feature class on disc has four fields that also exist in the two individual tables:

 

zipcode, month, year, clientCount, deliveryCount; client Count is in one table, deliveryCount the other. When I join them the field names change to tableName.fieldname:

 

table1.zipcode

table2.zipcode

table1.month

table2.month

table1.year

table2.year

table1.clientCount

table2.deliveryCount

 

I have tried to add additional fields to the joined table, (Zipcode, Month,Year,ClientCount,DeliveryCount) in hopes of making the subsequent append work smoothly, but when I try to add the fields I get an error saying it can't get an exclusive schema lock. Rats....

 

Is there anyway to avoid field mapping at this point?

Outcomes