<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Arcpy Append - How to load a .fieldmap file in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551526#M73081</link>
    <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I have a standard append script, how could I just load the a fieldmap file that I saved?&lt;/P&gt;&lt;P&gt;Append = arcpy.management.Append(inputs=[feature_class], target=hosted_feature, schema_type="NO_TEST", field_mapping="&lt;STRONG&gt;***Load FieldMap File***&lt;/STRONG&gt;")&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2024 19:05:08 GMT</pubDate>
    <dc:creator>CW-GIS</dc:creator>
    <dc:date>2024-10-23T19:05:08Z</dc:date>
    <item>
      <title>Arcpy Append - How to load a .fieldmap file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551526#M73081</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I have a standard append script, how could I just load the a fieldmap file that I saved?&lt;/P&gt;&lt;P&gt;Append = arcpy.management.Append(inputs=[feature_class], target=hosted_feature, schema_type="NO_TEST", field_mapping="&lt;STRONG&gt;***Load FieldMap File***&lt;/STRONG&gt;")&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 19:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551526#M73081</guid>
      <dc:creator>CW-GIS</dc:creator>
      <dc:date>2024-10-23T19:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Append - How to load a .fieldmap file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551547#M73082</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/471024"&gt;@CW-GIS&lt;/a&gt;&amp;nbsp;can you post an example of your fieldmap file?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, have you seen the example of using Field Mappings in the following &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/append.htm#:~:text=The%20following%20script%20demonstrates%20how%20to%20use%20the%20Append%20function." target="_self"&gt;example?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 19:22:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551547#M73082</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-10-23T19:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Append - How to load a .fieldmap file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551675#M73086</link>
      <description>&lt;P&gt;Append takes FieldMappings objects that can be created using a .loadFromString:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import os

def load_fieldmap(path: os.PathLike) -&amp;gt; arcpy.FieldMappings:
    with open(path, 'r') as fieldmap:
        return arcpy.FieldMappings().loadFromString(fieldmap.read())

arcpy.management.Append(
    inputs=["C:/path/to/input.gdb/input"],
    target="C:/path/to/output.gdb/output",
    schema_type="NO_TEST",
    field_mapping=load_fieldmap("C:/path/to/fieldmap.fieldmap")
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 01:40:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-how-to-load-a-fieldmap-file/m-p/1551675#M73086</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-10-24T01:40:07Z</dc:date>
    </item>
  </channel>
</rss>

