Select to view content in your preferred language

Append Tool does not respect field map

324
5
3 weeks ago
oharlacker_verita
Emerging Contributor

I recently encountered strange behavior upon attempting to append features from a FGDB to an AGOL Feature Service using the Append GP Tool. The two layer schemas do not match so I was using a field map to reconcile any differences. The tool then returned a set of warnings for each feature talking about how the value from one field in the input layer was not allowed in a different field in the target layer. (For example, it was warning about a value from a Type (TEXT) field not being able to be inserted into the Longitude (DOUBLE) field. These fields were not mapped together in the field map, but this warning went away when removing any mappings to the target layer's field. This is a new behavior that has only happened after the latest  bugfix release, and was not an issue last week. Running the append tool in arcpy with the schema_type parameter set to "NO_TEST" resulted in the features being appended correctly and without any warnings.

GP Tool OutputGP Tool OutputField Map for Longitude FieldField Map for Longitude FieldField Map for Type FieldField Map for Type Field

5 Replies
KevinSaavedra
Esri Contributor

Hi, I just want to clarify: the warning was raised when the input StructureType (text) field was not explicitly mapped to the target longitude (double) field? After the problem run, if you reset the field map in the field properties window, and re-map to reconcile field schema, does the problem still occur?

If you are able to share, I would be curious to see the field map string generated from the tool run that raised the warning.

In the history pane->geoprocessing tab->Append tool run that had the warning. Right click->copy python command.  Paste the output of the field_mapping parameter.

e.g.:

field_mapping=r'FacilityID "FacilityID" true true false 30 Text 0 0,First,#,C:\Path\to\gdb\redlands_buildings.gdb\Redlands_buildings_inpt,FacilityID,0,29; etc.

 

oharlacker_verita
Emerging Contributor

The problem occured when the StructureType field of the input layer was mapped to the StructureType field of the target layer and the Longitude of the input was mapped to the Longitude of the target. When all mappings were removed from the Longitude field, it no longer showed a warning about Longitude, but still showed a warning about a different field having the same issue. Resetting the field map resulted in the same mapping string.


The field map string from that specific tool run is:  

 

# Raw string directly from copy command:
field_mapping=r'Enabled "Enabled" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Enabled,-1,-1;Comments "Comments" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Comments,0,254;Name "Name" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Name,0,254;SymbolRotation "RotationAngle" true true false 0 Double 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,SymbolRotation,-1,-1;StructureType "StructureType" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,StructureType,0,49;Workflow_Status "WorkflowStatus" true true false 25 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Workflow_Status,0,24;GlobalID "GlobalID" true true false 38 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,GlobalID,-1,-1;ResidentialCount "ResidentialCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,ResidentialCount,-1,-1;CommercialCount "CommercialCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,CommercialCount,-1,-1;IsInMdu "IsInMdu" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,IsInMdu,-1,-1;NetworkId "NetworkId" true true false 38 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,NetworkId,-1,-1;VacantCount "VacantCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,VacantCount,-1,-1;FACILITYID "FACILITYID" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,FACILITYID,0,254;OWNER "OWNER" true true false 100 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,OWNER,0,99;Latitude "Latitude" true true false 0 Double 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Latitude,-1,-1;Longitude "Longitude" true true false 0 Double 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Longitude,-1,-1;ConstructionStatus "ConstructionStatus" true true false 20 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,ConstructionStatus,0,19;JobNumber "JobNumber" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,JobNumber,0,49;Material "Material" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Material,0,49;StructureSize "StructureSize" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,StructureSize,0,49;Manufacturer "Manufacturer" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Manufacturer,0,49;Model "Model" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Model,0,49;MDUCount "MDUCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,MDUCount,-1,-1;Market "Market" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Market,0,254'

# Formatted with newlines after semicolon:

field_mapping=r'
Enabled "Enabled" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Enabled,-1,-1;
Comments "Comments" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Comments,0,254;
Name "Name" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Name,0,254;
SymbolRotation "RotationAngle" true true false 0 Double 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,SymbolRotation,-1,-1;
StructureType "StructureType" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,StructureType,0,49;
Workflow_Status "WorkflowStatus" true true false 25 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Workflow_Status,0,24;
GlobalID "GlobalID" true true false 38 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,GlobalID,-1,-1;
ResidentialCount "ResidentialCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,ResidentialCount,-1,-1;
CommercialCount "CommercialCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,CommercialCount,-1,-1;
IsInMdu "IsInMdu" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,IsInMdu,-1,-1;
NetworkId "NetworkId" true true false 38 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,NetworkId,-1,-1;
VacantCount "VacantCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,VacantCount,-1,-1;
FACILITYID "FACILITYID" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,FACILITYID,0,254;
OWNER "OWNER" true true false 100 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,OWNER,0,99;
Latitude "Latitude" true true false 0 Double 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Latitude,-1,-1;
Longitude "Longitude" true true false 0 Double 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Longitude,-1,-1;
ConstructionStatus "ConstructionStatus" true true false 20 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,ConstructionStatus,0,19;
JobNumber "JobNumber" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,JobNumber,0,49;
Material "Material" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Material,0,49;
StructureSize "StructureSize" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,StructureSize,0,49;
Manufacturer "Manufacturer" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Manufacturer,0,49;
Model "Model" true true false 50 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Model,0,49;
MDUCount "MDUCount" true true false 0 Long 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,MDUCount,-1,-1;
Market "Market" true true false 255 Text 0 0,First,#,C:\Users\oharlacker\Documents\Projects\WOW\Append_Issues\GIS\Port A.gdb\UndergroundStructure,Market,0,254'

 

KevinSaavedra
Esri Contributor

Thanks. I can't immediately see any problems with the field map string that's being generated. A few more questions:

  • When you run the tool, is the "Optimize performance for Feature Services" parameter available? If so, do you run it checked or unchecked?
  • Is the target feature service a hosted feature service or is it published to reference an eGDB? (Edit: I see you said AGOL)
  • What is the schema difference between the target StructureType/Longitude fields and the input?
0 Kudos
oharlacker_verita
Emerging Contributor

This behavior happened both when the "Optimize performance for Feature Services" parameter was enabled and disabled. The target layer is a feature service hosted on AGOL. The input layer is an export from ArcFM but this hasn't been an issue in the past.

Target Layer Schema:

Field NameField TypeDomain
OBJECTIDOID 
EnabledInteger 
CommentsString 
NameString 
GlobalIDString 
IsInMduInteger 
NetworkIdString 
SpecSymbolString 
FACILITYIDString 
OWNERString 
LatitudeDouble 
LongitudeDouble 
JobNumberString 
MaterialString 
ModelString 
MDUCountInteger 
MarketString 
Permit_NoString 
GlobalID_2GlobalID 
CreationDateDate 
CreatorString 
EditDateDate 
EditorString 
Released_to_ConstructionStringUndergroundStructure_Released_to_Construction_...
Structure_TypeStringUndergroundStructure_Structure_Type_307a90b9-f...
Construction_StatusStringUndergroundStructure_Construction_Status_0e8e7...
CabinetString 
OLTString 
SymbolRotationDouble 
StructureTypeString 
ResidentialCountInteger 
CommercialCountInteger 
VacantCountInteger 
ConstructionStatusString 
StructureSizeString 
Workflow_StatusString 
ManufacturerString 
ShapeGeometry 

 

Input Layer Schema: 

Field NameField TypeDomain
OBJECTIDOID 
SHAPEGeometry 
AncillaryRoleSmallInteger 
EnabledSmallIntegerEnabledDomain
CreationUserString 
DateCreatedDate 
DateModifiedDate 
LastUserString 
CommentsString 
NameString 
SymbolRotationDouble 
StructureTypeStringStructure Type
Workflow_StatusStringWorkflow_Status
GlobalIDGlobalID 
ResidentialCountInteger 
CommercialCountInteger 
IsInMduIntegerYes/No
NetworkIdGuid 
CatalogIdString 
IsLongString 
VacantCountInteger 
SpecSymbologyString 
FACILITYIDString 
OWNERString 
LatitudeDouble 
LongitudeDouble 
ConstructionStatusStringFiber Construction Status
JobNumberString 
MaterialStringUndergroundStructureMaterial
StructureSizeStringUndergroundStructureSize
ManufacturerStringFiber Structure Manufacturer
ModelString 
FacilityDiagramIntegerYes/No Indicator
MDUCountInteger 
MarketStringF_Market
RT_GlobalIDGuid 
Ref_autocad_block_nameString 
Ref_autocad_entity_handleString 
Ref_autocad_layerString 
Ref_autocad_source_filenameString 
RT_IDString 
Ref_UniqeIDString 
Ref_AmpNameString 
Ref_RelationshipString 
SourceIDString 
RT_MARKETString 
RT_NetworkidGuid 
0 Kudos
KevinSaavedra
Esri Contributor

I'm unable to reproduce the issue with a local feature class using the schema you provided. This could be specific to the ArcFM export; if you are able to share, please send it to us at ksaavedra@esri.com.

0 Kudos