I am trying to migrate a dataset from one fileGDB to another using the Append tool.
When running a few features get copied over however the rest get the following error:
“WARNING 000594”: Input feature #: Unexpected operation”
- Same spatial reference.
To be clear this is an issue with the append tool as it does not work even if being run manually with the tool. I have also tried playing around with the following setting with no luck:
arcpy.env.overwriteOutput = True
arcpy.env.outputMFlag = "Same As Input"
arcpy.env.outputZFlag = "Same As Input"
#arcpy.env.XYDomain = "-180 -90 180 90"
arcpy.env.extent = "MAXOF"
# SPATIAL REFERENCE
# 26918 = UTM NAD83 ZONE 18N
spatial_ref = arcpy.SpatialReference(26918)
arcpy.env.inputCoordinateSystem = spatial_ref
arcpy.env.outputCoordinateSystem = spatial_ref
#arcpy.env.geographicTransformations = "NAD_1927_To_NAD_1983_NADCON"
# XY Tolerance
arcpy.env.XYResolution = 0.000001
def get_field_mappings(fc_in, dictionary):
field_mappings = arcpy.FieldMappings()
field_mappings.addTable(fc_in)
print ("\nField Mapping: {0}\n".format(fc_in))
for input, output in dictionary.iteritems():
print 'Field Map: "{0}" -> "{1}"'.format(input, output)
field_map = arcpy.FieldMap()
field_map.addInputField(fc_in, input)
field = field_map.outputField
field.name = output
field_map.outputField = field
field_mappings.addFieldMap(field_map)
del field, field_map
return field_mappings
def map_and_append_features(fc_in, fc_out, field_dictionary):
field_mappings = get_field_mappings(fc_in, field_dictionary)
arcpy.management.Append(fc_in, fc_out, "NO_TEST", field_mappings)