Joins do not work in Modelbuilder 10

11288
34
02-07-2011 01:07 PM
TomMagdaleno
Occasional Contributor III
So far I have been working on fixing models almost exclusively for a week!  I have models with multiple joins and calculations and ever since we upgraded to 10 they do not work.  I have a "Remove Join" and then a second Join, but I get errors saying that my inputs are not current.  When I do a validation it will tell me so and so table is already joined.  So I have to exit out, delete the joined table then open the model again to validate the data.  Now the data before the join won???t work because it thinks the ???field name does not exist??? because the table is no longer joined! 

MODELBUILDER USED TO BE SMARTER THAN THIS!

Now I have to break up my models into several models and export out intermediate data so I can work with it.  This is what I was told to do by tech support.  This is driving me nuts!

Also, ???Make Table View??? changes every time the model is validated.  If I have only a few columns checked in the table view, then run a validate it will recheck all the columns and screw up my output.  Tech support tells me to not use .dbf tables, to put everything in a geodatabase, do permanent joins and export out intermediate data.  This is getting to be WAY more steps then just doing a few simple joins and calculates in ArcMap.  Is anyone else dealing with this crap?
0 Kudos
34 Replies
RyanColeman
Occasional Contributor
I'm having the same problem as above. Spatial join doesn't result in tablename.fieldname only "add join" does this
0 Kudos
JoshWhite
Regular Contributor III
My problem is not as complicated.  I am appending to a feature class that requires a join before the append.  I used to do this manually but wanted to automate and speed up the process a bit by using model builder.  I only have ArcEditor so there are some options unavailable to me.  Is there a way to join a table in model builder before appending the resulting feature class to the previously mentioned empty feature class?
Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
JimW1
by
Occasional Contributor II
For those still banging their heads against the wall:

I have a call into ESRI about this issue but I've made so headway for those that need a quick fix.
On my ArcGIS 10 SP2 the 'Add Join' tool will always add fully qualified field names (aka alias, tablename.fieldname, tablename_fieldname) regardless of what the environment settings are in the Canvas view.

If I right click on the model in the toolbox and got to model properties, then 'Maintain fully qualified field names' is unchecked - see attached. Running the model results in the tablename.fieldname outputs.

Now if I run the model from ArcCatalog and on the parameters page look at the environment settings the 'Maintain fully...' is checked - see second attached. If I uncheck this box and run the model then the fields are the fieldnames without the tablename. This setting has to be manually changed each time the model is run.

The two areas to set environment parameters do not respect eachother. I have also tried 10+ combinations of check/uncheck/save/apply/uncheck/save/validate/run/save in the Canvas view without anything working.

This is the only way I can get 'Add join' to work the way I want it to in model builder 10.
This is of course a huge pain as I can no longer step through models in the canvas view as I did so effortlessly in 9.3.1 but hopefully this helps anyone else experiencing my frustrations with model builder 10 and 'Add Join'. I'll update if ESRI Canada finds a solution for me.
0 Kudos
GavinJackson1
New Contributor II
Just a question: When you check/uncheck maintain fully qualified field names, is it an environment setting in your model, or in the arccatalog program or at the tool level because there is an overwriting sequence that goes: arccatlog > model > tool, with each environment setting "overwriting" the previous if the same 'option' is used.
0 Kudos
JimW1
by
Occasional Contributor II
Just a question: When you check/uncheck maintain fully qualified field names, is it an environment setting in your model, or in the arccatalog program or at the tool level because there is an overwriting sequence that goes: arccatlog > model > tool, with each environment setting "overwriting" the previous if the same 'option' is used.


So the only check that will respond is at the ArcCatalog level when run from the 'Contents' tab. The model parameter window has to be open and the envirnment setting in there is the only one that will respond.

If I right click in catalog and go to properties of the model the 'maintain...' is unchecked. When I run the model it acts as if it is checked. If I run the model in canvas view the check also has no impact. If I change it at the tool level there is also no effect.

The only place that 'maintain fully...' is actually checked is when I run the model from catalog and in the model parameter interface I go to environment settings there. In that place the box is checked and once unchecked the model works as intended - no tablename.fieldname

In the sequence the option is being set at the ArcCatalog level but only in the environment settings when the tool is run and not from the properties of the model when right-clicked in catalog.

You reminded me I have a support case in with ESRI. They replicated the bug there and it's been  2 weeks since I heard from them.
0 Kudos
JimW1
by
Occasional Contributor II
I got back from ESRI:

NIM069071  The environment setting to 'Maintain fully qualified field names' is not honored when performing an Add Join in Modelbuilder
0 Kudos
curtvprice
MVP Esteemed Contributor
I got back from ESRI:

NIM069071  The environment setting to 'Maintain fully qualified field names' is not honored when performing an Add Join in Modelbuilder


Thank you for getting that logged and sharing that NIM# here. Everyone please use all avenues at your disposal (ideas.esri.com, support tickets, ESRI doctor's office) to push this getting fixed and soon. If you have Premium Support please ask for a hotfix so we can get a patch online!

I sure hope they marked it Critical!
0 Kudos
JimW1
by
Occasional Contributor II


I sure hope they marked it Critical!


I'm not hoping too hard here. I had my ticket closed on me without any useful resolution beyond it is a bug and I should contact ESRI to find out the status of the bug.

I wrote back asking for a workaround before closing my ticket and got a new ticket number auto-response. And so I get even more jaded...

I'll keep you posted if I get a critically needed workaround for this issue that does not involve re-mapping field names
0 Kudos
curtvprice
MVP Esteemed Contributor
I found a possible workaround in the old forums. I realize this involves re-mapping field names but it may be the only way.

http://forums.esri.com/thread.asp?c=93&f=1728&t=224243

Subject Re: "Export" a table in Modelbuilder 
Author Karl Brotzman 
Date Jun 19, 2007 
Message Take a look at DataManagementTools -> General -> Merge. I've used it to clean up a file after three joins. If you double click the tool after you've added it to a model in the model builder, you'll see the "Field Map" at the bottom of the dialog. You can delete and rename fields there. Worked great for me. The tool accepts a single feature class as well as multiple. That's how I use it.

The only setback I've had is with the persistence of the "Field Map". It was working great, but somehow the model reverted to the default or original Field Map which is all the fully qualified and mangled names. So, I had to retype the map. I tried without success to reproduce that problem.


Those of us at the UC should make a point to ask about this at the geoprocessing island. (I've found this is a very effective way to get things on their radar. I try to sweeten the pie by giving them well-deserved thanks for successes while I'm there -- for example, I absolutely love the new iterator functionality - it's very useful and has worked very well for me.)

Joins in model builder have been a hassle from the beginning. We need it to work better than this!
0 Kudos
JimW1
by
Occasional Contributor II
I got a workaround from ESRI Canada (from ESRI Inc.) and it's actually pretty decent.

In the canvas view add a model parameter to the tool after the 'Add Join'. In the attached image I have it on 'Feature Class to Shapefile' but it was tested on 'Copy Features'.

Make Variable>From Environment>Fields>Maintain Fully Qualified Names>

When the model is run in the canvas view it will respect the True/False for that variable now. If you delete this visible parameter it reverts back to the tablename.fieldname name mangling.
0 Kudos