I'm trying to get FieldMappings—Help | ArcGIS Desktop to work. The need is to append records from one table to records of a different table with the NO_TEST option as the two don't have the same schemas. I've tried with a table to table append, and also with a feature class to feature class append. In both cases I can get the records from one table to append to the target table, and feature geometry to append to the target feature class. But.... None of the attribute values come over in either case. This has to be one of the most complex processes I've ever seen, and I cannot for the life of me see where the issue is. Below is the python script I'm using to do it; pretty much right out of the help page. If anyone has had this work for them, perhaps your second set of eyes is what I need....
<SPAN class="keyword token">import</SPAN> arcpy
in_file1 <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'C:\Replicas\Replicas.gdb\MasterStreetNameFC'</SPAN>
<SPAN class="comment token">#arcpy.MakeTableView_management(view1,in_file1)</SPAN>
<SPAN class="comment token">#output_file = r'C:\Replicas\Replicas.gdb\CoordOverlapErrors'</SPAN>
output_file <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'C:\Replicas\Replicas.gdb\Points'</SPAN>
fm_streetname <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_type <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_housedir <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_begrange <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_endrange <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_begcoord <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_endcoord <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_streetdir <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_cityjurs <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_zipcode <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fm_oid <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fms <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMappings<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token">##s_name = 'StreetName'</SPAN>
<SPAN class="comment token">##s_type = 'Type'</SPAN>
<SPAN class="comment token">##s_housedir = 'HouseDir'</SPAN>
<SPAN class="comment token">##s_begrange = 'BegRange'</SPAN>
<SPAN class="comment token">##s_endrange = 'EndRange'</SPAN>
<SPAN class="comment token">##s_begcoord = 'BegCoord'</SPAN>
<SPAN class="comment token">##s_endcoord = 'EndCoord'</SPAN>
<SPAN class="comment token">##s_streetdir = 'StreetDir'</SPAN>
<SPAN class="comment token">##s_cityjurs = 'CityJurs'</SPAN>
<SPAN class="comment token">##s_zipcode = 'ZipCode'</SPAN>
<SPAN class="comment token">##s_oid = 'OBJECTID'</SPAN>
<SPAN class="comment token">##</SPAN>
<SPAN class="comment token">## These variables are commented out</SPAN>
<SPAN class="comment token">## as I used the actual field names below</SPAN>
<SPAN class="comment token">## thinking maybe the variables were the problem...</SPAN>
fm_streetname<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN><SPAN class="string token">'StreetName'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_type<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'Type'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_housedir<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'HouseDIr'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_begrange<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'BegRange'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_endrange<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'EndRange'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_begcoord<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'BegCoord'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_endcoord<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'EndCoord'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_streetdir<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'StreetDir'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_cityjurs<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'CityJurs'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_zipcode<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'ZipCode'</SPAN><SPAN class="punctuation token">)</SPAN>
fm_oid<SPAN class="punctuation token">.</SPAN>addInputField<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'OBJECTID'</SPAN><SPAN class="punctuation token">)</SPAN>
StreetName1 <SPAN class="operator token">=</SPAN> fm_streetname<SPAN class="punctuation token">.</SPAN>outputField
Type1 <SPAN class="operator token">=</SPAN> fm_type<SPAN class="punctuation token">.</SPAN>outputField
HouseDir1 <SPAN class="operator token">=</SPAN> fm_housedir<SPAN class="punctuation token">.</SPAN>outputField
BegRange1 <SPAN class="operator token">=</SPAN> fm_begrange<SPAN class="punctuation token">.</SPAN>outputField
EndRange1 <SPAN class="operator token">=</SPAN> fm_endrange<SPAN class="punctuation token">.</SPAN>outputField
BegCoord1 <SPAN class="operator token">=</SPAN> fm_begcoord<SPAN class="punctuation token">.</SPAN>outputField
EndCoord1 <SPAN class="operator token">=</SPAN> fm_endcoord<SPAN class="punctuation token">.</SPAN>outputField
StreetDir1 <SPAN class="operator token">=</SPAN> fm_streetdir<SPAN class="punctuation token">.</SPAN>outputField
CityJurs1 <SPAN class="operator token">=</SPAN> fm_cityjurs<SPAN class="punctuation token">.</SPAN>outputField
Zip1 <SPAN class="operator token">=</SPAN> fm_zipcode<SPAN class="punctuation token">.</SPAN>outputField
OID1 <SPAN class="operator token">=</SPAN> fm_oid<SPAN class="punctuation token">.</SPAN>outputField
<SPAN class="comment token">#</SPAN>
StreetName2 <SPAN class="operator token">=</SPAN> fm_streetname<SPAN class="punctuation token">.</SPAN>outputField
Type2 <SPAN class="operator token">=</SPAN> fm_type<SPAN class="punctuation token">.</SPAN>outputField
HouseDir2 <SPAN class="operator token">=</SPAN> fm_housedir<SPAN class="punctuation token">.</SPAN>outputField
BegRange2 <SPAN class="operator token">=</SPAN> fm_begrange<SPAN class="punctuation token">.</SPAN>outputField
EndRange2 <SPAN class="operator token">=</SPAN> fm_endrange<SPAN class="punctuation token">.</SPAN>outputField
BegCoord2 <SPAN class="operator token">=</SPAN> fm_begcoord<SPAN class="punctuation token">.</SPAN>outputField
EndCoord2 <SPAN class="operator token">=</SPAN> fm_endcoord<SPAN class="punctuation token">.</SPAN>outputField
StreetDir2 <SPAN class="operator token">=</SPAN> fm_streetdir<SPAN class="punctuation token">.</SPAN>outputField
CityJurs2 <SPAN class="operator token">=</SPAN> fm_cityjurs<SPAN class="punctuation token">.</SPAN>outputField
Zip2 <SPAN class="operator token">=</SPAN> fm_zipcode<SPAN class="punctuation token">.</SPAN>outputField
OID2 <SPAN class="operator token">=</SPAN> fm_oid<SPAN class="punctuation token">.</SPAN>outputField
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_streetname<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_type<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_housedir<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_begrange<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_endrange<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_begcoord<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_endcoord<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_streetdir<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_cityjurs<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_zipcode<SPAN class="punctuation token">)</SPAN>
fms<SPAN class="punctuation token">.</SPAN>addFieldMap<SPAN class="punctuation token">(</SPAN>fm_oid<SPAN class="punctuation token">)</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>Append_management<SPAN class="punctuation token">(</SPAN>in_file1<SPAN class="punctuation token">,</SPAN>output_file<SPAN class="punctuation token">,</SPAN><SPAN class="string token">'NO_TEST'</SPAN><SPAN class="punctuation token">,</SPAN>fms<SPAN class="punctuation token">)</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>