Select to view content in your preferred language

Trouble with the field mapping with the append tool

59
1
Jump to solution
yesterday
Laura_m_Conner
New Contributor III

All,

I am developing a script to be ran in the python window in Pro. Currently the arcpy.management.Append is giving me trouble. One particular field needs ported over. Since the name of the fields do not match i am trying to use field mapping. The append works in general but I have been unable to get field mapping working despite trying to copy the syntax the documentation hade in the examples. It just put nulls in the field I am trying to specify. currently my code is:

 

disolved_file = r"C:\\Path\to\the\document\on\PC\MyProject43.gdb\input_for_append"
Sweeping_FL=r"Path_to_web_feature\\web_feature_2022"
feild_match = [["Name","Fullname"]]

arcpy.management.Append(disolved_file, Sweeping_FL, "NO_TEST", match_fields = feild_match )

 

yes I have permissions to update the web file.

the Name field belongs to web_feature_2022, while the Fullname belongs to input_for_append.

I have tried putting the [["Name","Fullname]] directly in the into call for the arcpy.management.Append but that had the same result.

Arc pro 3.3

thanks

 

 

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi @Laura_m_Conner,

In ArcGIS Pro, set up the Append tool as if you were going to execute it, but before clicking Run, click the dropdown arrow next to this and click Copy Python Command.  Paste that code into your script and do a comparison to what you have.

JakeSkinner_0-1720709180954.png

 

View solution in original post

1 Reply
JakeSkinner
Esri Esteemed Contributor

Hi @Laura_m_Conner,

In ArcGIS Pro, set up the Append tool as if you were going to execute it, but before clicking Run, click the dropdown arrow next to this and click Copy Python Command.  Paste that code into your script and do a comparison to what you have.

JakeSkinner_0-1720709180954.png