<?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 Re: Syntax for layer_mappings parameter in FeatureLayer.append in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634566#M11518</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Unfortunately I am indeed trying to update using a Feature Service after all attempts to use an fgdb that is an existing item in agol have failed. The variable name in my code snip is an artifact of those attempts.&lt;/P&gt;&lt;P&gt;In the &lt;STRONG&gt;&lt;EM&gt;Feature Service&lt;/EM&gt;&lt;/STRONG&gt; case, manually entering the parameters from the REST endpoint interface works fine.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://services.arcgis.com/********/ArcGIS/rest/services/******/FeatureServer/3/append?token=******&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-21 072312.png" style="width: 601px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136832iB33081DA35B6725B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-21 072312.png" alt="Screenshot 2025-07-21 072312.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-21 072507.png" style="width: 395px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136833i2E2E78A28ABF8359/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-21 072507.png" alt="Screenshot 2025-07-21 072507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-21 072752.png" style="width: 637px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136834i4F8523A1F0716AB0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-21 072752.png" alt="Screenshot 2025-07-21 072752.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So the issue appears to me to just be the python syntax. I've opened a support ticket so we'll see if that gets it resolved.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 14:30:19 GMT</pubDate>
    <dc:creator>oregonparksgis</dc:creator>
    <dc:date>2025-07-21T14:30:19Z</dc:date>
    <item>
      <title>Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634062#M11507</link>
      <description>&lt;P&gt;I can't seem to find the correct syntax for the &lt;EM&gt;layer_mappings&lt;/EM&gt; parameter of &lt;EM&gt;append&lt;/EM&gt;.&amp;nbsp;I checked the &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer" target="_blank" rel="noopener"&gt;API reference&lt;/A&gt; and I've got the argument name right, however, the line below throws&amp;nbsp; &lt;FONT color="#FF0000"&gt;TypeError: append() got an unexpected keyword argument 'layer_mappings'&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fLyr.append(fgd_item, upload_format="featureService", layer_mappings=[{"id": 3, "sourceId": 0}])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also checked the REST API syntax too but that didn't seem to help. Anyone used this parameter before?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 00:42:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634062#M11507</guid>
      <dc:creator>oregonparksgis</dc:creator>
      <dc:date>2025-07-18T00:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634064#M11508</link>
      <description>&lt;P&gt;curious, since the syntax in your link shows&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;layerMappings=[{“id”: &amp;lt;layerID&amp;gt;, “sourceId”: &amp;lt;layer id&amp;gt;}]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 00:54:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634064#M11508</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-07-18T00:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634069#M11509</link>
      <description>&lt;P&gt;Yeah I can't figure it out, since the help shows both&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-17 180038.png" style="width: 904px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136745i8D018E38C10EC90A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-17 180038.png" alt="Screenshot 2025-07-17 180038.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried that other way as well and get the same&amp;nbsp;&lt;FONT color="#FF0000"&gt;TypeError: append() got an unexpected keyword argument 'layerMappings'&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fLyr.append(fgd_item, upload_format="featureService", layerMappings=[{"id": 3, "sourceId": 0}])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 01:03:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634069#M11509</guid>
      <dc:creator>oregonparksgis</dc:creator>
      <dc:date>2025-07-18T01:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634514#M11515</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/476650"&gt;@oregonparksgis&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I see you are using upload_format="featureService", is this correct since your item_id parameter is fgd_item, are you attempting to append from a File Geodatabase? If so change to upload_format="filegdb".&lt;/P&gt;&lt;P&gt;You then use the source_table_name parameter to get the data from the source feature class in the gdb and append to the feature layer. You can only do one layer at a time from a gdb, but you could use a for loop to do all your layers with a single script.&lt;/P&gt;&lt;P&gt;You might be getting the error:&amp;nbsp;&lt;SPAN&gt;TypeError: append() got an unexpected keyword argument 'layer_mappings' because it is detecting a gdb rather than a feature service and the&amp;nbsp;layer_mappings parameter is only available when appending from a Feature Service to Feature Service and not from File Geodatabase to Feature (Layer) Service.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;On the other hand, if your source is indeed a Feature Service, then I am at a loss&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;All the best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Glen&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 12:19:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634514#M11515</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-07-21T12:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634566#M11518</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Unfortunately I am indeed trying to update using a Feature Service after all attempts to use an fgdb that is an existing item in agol have failed. The variable name in my code snip is an artifact of those attempts.&lt;/P&gt;&lt;P&gt;In the &lt;STRONG&gt;&lt;EM&gt;Feature Service&lt;/EM&gt;&lt;/STRONG&gt; case, manually entering the parameters from the REST endpoint interface works fine.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://services.arcgis.com/********/ArcGIS/rest/services/******/FeatureServer/3/append?token=******&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-21 072312.png" style="width: 601px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136832iB33081DA35B6725B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-21 072312.png" alt="Screenshot 2025-07-21 072312.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-21 072507.png" style="width: 395px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136833i2E2E78A28ABF8359/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-21 072507.png" alt="Screenshot 2025-07-21 072507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-07-21 072752.png" style="width: 637px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136834i4F8523A1F0716AB0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-07-21 072752.png" alt="Screenshot 2025-07-21 072752.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So the issue appears to me to just be the python syntax. I've opened a support ticket so we'll see if that gets it resolved.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 14:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634566#M11518</guid>
      <dc:creator>oregonparksgis</dc:creator>
      <dc:date>2025-07-21T14:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634915#M11522</link>
      <description>&lt;P&gt;Went to Kudo on my phone and accidentally hit accept as solution! Ah well &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 12:36:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1634915#M11522</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-07-22T12:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for layer_mappings parameter in FeatureLayer.append</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1646601#M11603</link>
      <description>&lt;P&gt;In case anyone else stumbles upon this...&lt;/P&gt;&lt;P&gt;This is indeed the correct syntax for current versions of Pro/python/Jupyter:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;layer_mappings=[{"id": &amp;lt;layerID&amp;gt;, "sourceId": &amp;lt;layerID&amp;gt;}])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I finally figured it out and the issue is apparently one of Pro/python versions. I had been working with Pro 3.2 python 3.9.18 and was getting an argument error for the layer_mappings.&lt;BR /&gt;&lt;BR /&gt;However, running the same script in a Jupyter Notebook or with Arc Pro 3.4/python 3.11.10 works fine.&amp;nbsp; I still don't know what the correct argument is for the older version but I'm upgrading anyway so its no longer an issue.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 18:58:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/syntax-for-layer-mappings-parameter-in/m-p/1646601#M11603</guid>
      <dc:creator>oregonparksgis</dc:creator>
      <dc:date>2025-08-28T18:58:03Z</dc:date>
    </item>
  </channel>
</rss>

