I'm merging a bunch of feature classes (400) and trying to understand the Field Map settings. I need to map multiple input fields onto one output field, but I can't figure out how to do that (it looks like I have to do it for each feature class individually, which can't be right). I've read the ESRI help page, but it just didn't go into enough detail for me. If some kind soul could step me through the process, I would appreciate it. Or if there's an ESRI tutorial that would help, I'd be grateful for the title.
Solved! Go to Solution.
There is no solution to this other than doing it one by one or coding a solution which would search through files to find ones which are compliments of the other and doing the field map that way. I suspect that it would take a while unless you can split the work up amongst other people or by yourself on multiple machines. I suspect that coding isn't a solution then.
So the fields are different between each of the 400?
No, about half of the feature classes have one variation of a field name and the other have another. It should be straightforward, but I just couldn't figure out how to do it.
There may be other ways to go about it, but I would probably merge the two halves independently. Merge the ~200 with the one variation of fields, then merge the other ~200 with other variation. Then merge those 2, so you're only field mapping for 2 feature classes.
Oh dear, I'm afraid I don't follow. I thought you select one of the fields as your output field to map onto, and then select both of the input field variations to map onto that output field. But when you select input fields, it seems to make you do it file by file, which takes a long time for 200 files.
There is no solution to this other than doing it one by one or coding a solution which would search through files to find ones which are compliments of the other and doing the field map that way. I suspect that it would take a while unless you can split the work up amongst other people or by yourself on multiple machines. I suspect that coding isn't a solution then.
OK, thanks, then I'm not crazy! You never know.
So I did end up just merging without mapping and then creating a new field and calculating it differently for the two categories of features. It took a few minutes, but nothing like it would have taken to map each individually. I probably should put a little time into learning Python.
Field mapping is only required if you don't have common field names between the files to merge, but you want all the data in one column. You said half of the 400 feature classes had one set identical field names, and the other half had identical. Running the merge tool twice, as I described, is equivalent to what you did with the field calculator. Instead of using the field map settings when merging the two intermediate feature classes, you calculated the field back in to a common column after merging.
"it should be a simple thing to allow it to move multiple fields". You can move multiple input fields to 1 field in the field map. But you need to select them interactively, it won't automatically select the 400 fields to map to the 1 output field.
If you had 400 variations of input field names to merge, then you'd be stuck doing something like this or coding. But since you only had 2 variations, that why I would not go this route and stick with the field calc you did or the 2 consecutive merges.
See image-- you can multi select all the fields of inputs to map to 1 output field.