I'm working to develop a python script which merges two feature classes into one. I found the following arcpy example quite helpful, however it's only provides an example of how you might approach the problem of mapping input fields with different names and logically similar content for 1 input field from the 2 feature classes. My issue is that I have many fields from both input datasets which contain logically similar content.
Example from ArcPy docs:
outfc = "C:/data/CityData.gdb/AllBlocks"
# Want to merge these two feature classes together. Have a field
# that has the same content but the names are slightly different:
# Blocks1 has TRACT2000 and Blocks2 TRACTCODE. Name the output
# the same as Blocks1.
fc1 = "C:/data/CityData.gdb/Blocks1"
fc2 = "C:/data/CityData.gdb/Blocks2"
# Create a new fieldmappings and add the two input feature classes.
fieldmappings = arcpy.FieldMappings()
# First get the TRACT2000 fieldmap. Then add the TRACTCODE field
# from Blocks2 as an input field. Then replace the fieldmap within
# the fieldmappings object.
fieldmap = fieldmappings.getFieldMap(fieldmappings.findFieldMapIndex("TRACT2000"))
# Remove the TRACTCODE fieldmap.
# Create a value table that will hold the inputs for Merge.
vTab = arcpy.ValueTable()
# Run the Merge tool.
arcpy.Merge_management(vTab, outfc, fieldmappings)
Does my question make sense?